core.configuration
Parse configuration options and set them to be used throughout the Jobmon Architecture.
Attributes
Classes
Default config setup using YAML. |
|
Client command line interface for update the config. |
Functions
|
Create CLI. |
Module Contents
- class core.configuration.JobmonConfig(filepath: str = '', dict_config: Dict | None = None)[source]
Default config setup using YAML.
- get(section: str, key: str) str[source]
Get the configuration value for the section and key. Raise if key not found.
- Parameters:
section – the section of the yaml to search.
key – the key within the section to retrieve
Raises: ConfigError
- get_section(section: str) Dict[str, Any][source]
Returns a dictionary of all key-value pairs in the given section.
The order of precedence: dict_config > Environment Variable > YAML File.
- get_boolean(section: str, key: str) bool[source]
Get the configuration value for the section and key as bool.
Raise if key not found.
- get_int(section: str, key: str) int[source]
Get the configuration value for the section and key as int.
Raise if key not found.
- get_float(section: str, key: str) float[source]
Get the configuration value for the section/key as float. Raise if key not found.
- set(section: str, key: str, val: str) None[source]
Set the configuration value for the section/key.
- write(filepath: str | pathlib.Path = '') None[source]
Persist the current config to disk.