pyoaev.configuration.sources

Module Contents

class pyoaev.configuration.sources.EnvironmentSource

A utility for fecthing a value in the env vars.

classmethod get(env_var: str) str | None

Gets the value for the specified env var

Parameters:

env_var (str) – the name of the env var to query

Returns:

value of the env var, or None if not found

Return type:

str | None

class pyoaev.configuration.sources.DictionarySource

A utility for fetching a value from within a JSON-like (nested dict) structure

classmethod get(config_key_path: list[str], source_dict: dict) str | None

Gets the value for the specified env var

Parameters:
  • config_key_path (list[str]) – the two-level dictionary path to the config key

  • source_dict (dict) – JSON-like (nested dict) structure containing config values.

Returns:

value for the config key at specified path, or None if not found

Return type:

str | None