class documentation

class Environment: (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method load Return a nested dict containing values from `os.environ`.
Instance Variable data Undocumented
Method _cast Undocumented
Method _crawl Examine config at location ``key_path`` & return potential env vars.
Method _path_get Undocumented
Method _path_set Undocumented
Method _to_env_var Undocumented
Instance Variable _config Undocumented
Instance Variable _prefix Undocumented
def __init__(self, config, prefix): (source)

Undocumented

def load(self): (source)

Return a nested dict containing values from `os.environ`. Specifically, values whose keys map to already-known configuration settings, allowing us to perform basic typecasting. See :ref:`env-vars` for details.

Undocumented

def _cast(self, old, new_): (source)

Undocumented

def _crawl(self, key_path, env_vars): (source)

Examine config at location ``key_path`` & return potential env vars. Uses ``env_vars`` dict to determine if a conflict exists, and raises an exception if so. This dict is of the following form:: { 'EXPECTED_ENV_VAR_HERE': ['actual', 'nested', 'key_path'], ... } Returns another dictionary of new keypairs as per above.

def _path_get(self, key_path): (source)

Undocumented

def _path_set(self, key_path, value): (source)

Undocumented

def _to_env_var(self, key_path): (source)

Undocumented

Undocumented

Undocumented