Skip to main content

parse_url_to_config

Function
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]) -> Any

Parameters

url
str
required
URL string (e.g., “postgresql://localhost/db”)
config_class
type
required
Config dataclass to instantiate
url_schemes
Dict
required
Mapping of URL schemes to backend names

Returns

Returns
Any
Config instance with backend and url set

Exceptions

If URL scheme is not supported

Uses

  • detect_url_scheme
  • ValueError
  • config_class

Source

View on GitHub

praisonaiagents/config/parse_utils.py at line 53