Parse URL To Config • AI Agent SDK
parse_url_to_config: Parse a URL string into a config object.
parse_url_to_config
Function
</div>
This function is defined in the parse_utils module.
Parse a URL string into a config object.
Signature
def parse_url_to_config(url: str, config_class: type, url_schemes: Dict[str, str]) -> AnyParameters
ParamField
strURL string (e.g., “postgresql://localhost/db”)
ParamField
typeConfig dataclass to instantiate
ParamField
DictMapping of URL schemes to backend names
Returns
ResponseField
AnyConfig instance with backend and url set
Exceptions
ValueError
If URL scheme is not supported
Uses
detect_url_schemeValueErrorconfig_class
Source
View on GitHubpraisonaiagents/config/parse_utils.py at line 53