hydromt.config.configread#

hydromt.config.configread(config_fn: Path | str, defaults: Dict | None = None, abs_path: bool = False, skip_abspath_sections: List | None = None, **kwargs) Dict[source]#

Read configuration/workflow file and parse to (nested) dictionary.

Parameters:
  • config_fn (Union[Path, str]) – Path to configuration file

  • defaults (dict, optional) – Nested dictionary with default options, by default dict()

  • abs_path (bool, optional) – If True, parse string values to an absolute path if the a file or folder with that name (string value) relative to the config file exist, by default False

  • skip_abspath_sections (list, optional) – These sections are not evaluated for absolute paths if abs_path=True, by default [‘update_config’]

  • **kwargs – Additional keyword arguments that are passed to the read_ini` function.

Returns:

cfdict – Configuration dictionary.

Return type:

dict