upsilonconf.load_config¶
- upsilonconf.load_config(path: Path | str, key_mods: Mapping[str, str] | None = None, config_io: ConfigIO | None = None) ConfigurationBase [source]¶
Load configuration from a file.
- Parameters:
- pathPath or str
Path to a readable text file on disk.
- key_modsdict, optional
A dictionary mapping key substrings to replacement patterns. This allows to modify keys with invalid characters for config keys.
- config_ioConfigIO, optional
The IO to use for reading the file. If not specified, the default IO will be used.
- Returns:
- configConfigurationBase
A configuration object with the key-value pairs as provided in the file.
See also
io.get_default_io
retrieve the default IO.
io.ConfigIO.load_config
implementation of functionality.