classy_config.config module#

class classy_config.config.ConfigValue(variable_path: str, _type: Type[T], deliminator: str = '.')#

Bases: object

Resolve to a value defined within the config.

classy_config.config.get_raw_config() MutableMapping[str, Any]#
Returns:

The current loaded config.

classy_config.config.register_config(filepath: str | ~pathlib.Path, prefix: str | None = None, loader: ~classy_config.loader.loader.Loader = <function auto_loader>, strict: bool = False) None#

Register a config file to load from.

Parameters:
  • filepath – Path to the config to load.

  • prefix – Prefix all config values loaded.

  • loader – Loader to user for gathering values from config file. The default auto_loader will resolve a loader from the config file’s extension.

  • strict – If strict, any duplicate keys will raise a ValueError. If not strict, duplicate keys will attempt to be merged if both values are dicts.

Returns: