lomas_server.utils package
Submodules
lomas_server.utils.config module
- class lomas_server.utils.config.ConfigLoader[source]
Bases:
object
Singleton object that holds the config for the server.
Initialises the config by calling load_config() with its default arguments.
The config can be reloaded by calling load_config with other arguments.
- load_config(config_path: str = '/usr/lomas_server/runtime.yaml', secrets_path: str = '/usr/lomas_server/secrets.yaml') None [source]
Loads the config and the secret data from disk,.
Merges them and returns the config object.
- Parameters:
config_path (str, optional) – The config filepath. Defaults to CONFIG_PATH.
secrets_path (str, optional) – The secrets filepath. Defaults to SECRETS_PATH.
- Raises:
InternalServerException – If the config cannot be correctly interpreted.