hermes.config

Module Contents

Functions

configure(config_path, working_path)

Load the configuration from the given path as global hermes configuration.

get(→ dict)

Retrieve the configuration dict for a certain sub-system (i.e., a section from the config file).

init_logging()

getLogger(log_name)

Attributes

_logging_config

_config

_loggers

hermes.config._logging_config
hermes.config._config
hermes.config.configure(config_path: pathlib.Path, working_path: pathlib.Path)

Load the configuration from the given path as global hermes configuration.

Parameters

config_path – The path to a TOML file containing HERMES configuration.

hermes.config.get(name: str) dict

Retrieve the configuration dict for a certain sub-system (i.e., a section from the config file).

The returned dict comes directly from the cache. I.e., it is possible to do the following stunt to inject default values:

Parameters

name – The section to retrieve.

Returns

The loaded configuration data or an empty dictionary.

hermes.config._loggers
hermes.config.init_logging()
hermes.config.getLogger(log_name)