read_config#
- caput.config.Reader.read_config(config: dict, compare_keys: bool | list[str] = False, use_defaults: bool = True) None[source]#
Set all properties in this class from the supplied config.
- Parameters:
- config
dict Dictionary of configuration values.
- compare_keysbool |
list[str], optional If True, a CaputConfigError is raised if there are unused keys in the config dictionary. If a list of strings is given, any unused keys except the ones in the list lead to a
CaputConfigError.- use_defaultsbool, optional
If False, a CaputConfigError is raised if a property is not defined by the config dictionary
- config
- Raises:
CaputConfigErrorIf there was an error in the config dict.