Skip to content

config_handler

Config handler

Classes:

Config

Config class

Methods:

  • __getattr__

    Function to get a specific key from settings

  • __new__

    (Real c-tor) Function to instantiate Config class

  • get

    Function to get a specific key from settings

  • get_settings

    Function to return settings dictionary

__getattr__

__getattr__(key: str) -> Any | None

Function to get a specific key from settings

Parameters:

  • key

    (str) –

    Key name

Returns:

  • Any | None

    Settings matching key

__new__

__new__(*args, **kwargs) -> Config

(Real c-tor) Function to instantiate Config class

Parameters:

  • args

    (List[str], default: () ) –

    Positional arguments

  • kwargs

    (Dict[str, Any], default: {} ) –

    Keyword arguments

get

get(*args, default: Any | None = None) -> Any

Function to get a specific key from settings This function works also recursively (multiple keys)

Parameters:

  • args

    (List[str], default: () ) –

    Positional arguments

  • default

    (Any | None, default: None ) –

    Default value for final key if not found

Returns:

  • Any

    Specific key

get_settings

get_settings() -> Dict[str, Any] | None

Function to return settings dictionary

Returns:

  • Dict[str, Any]

    Settings dictionary, Empty dict if no settings were found