API Documentation

class yaconfigobject.Config(paths=None, name=None, **kwargs)[source]

Bases: yaconfigobject.ConfigContainer

from_environment(name)[source]

Update config values based on environment variables prefixed with an uppercase conffile base name (iwthout extension).

Parameters:name (str) – Full path to the config file
Returns:
A dictionary containing all config values found within
environment variables.
Return type:(dict)
class yaconfigobject.ConfigContainer[source]

Bases: dict

A dictionary object holding all config items.

check_folders(keyword='folder', create=False)[source]

Perform check if folders exist. Folders are identified by a keyword as a substring of the corresponding field name.

Kwargs:
keyword (str): Keyword identifying folder fields in the config
file. All fields containing this keyword as a substring are considered.
create (boolean): Whether non-existing folders will be created or
not.

Returns:

load(conffile)[source]

Load an arbitrary configuration file. Multiple files can be loaded, the last file loaded will take precedence over previously loaded files.

update(other)[source]

Modify update function for consistent handling of nested ConfigContainers.