Skip to content

Dicfg is a configuration system that supports dependency injection via object interpolation in config files.

License

Notifications You must be signed in to change notification settings

martvanrijthoven/dicfg

Repository files navigation

PyPI Conda (channel only) docs CI Tests Coverage Status GitHub PyPI - Python Version DOI

Dicfg is a configuration system that supports dependency injection via object interpolation in config files.

Main Features

  • Loading of predefined config files (YAML and JSON).
  • Overwrite config with user_config files/dictionaries, command line interface, and/or presets.
  • Customize merge/replace behavior for dictionaries and lists.
  • Interpolation support for sub-config files, config variables, environment variables, and python objects.
  • Build object instances directly in the config.
  • Dependency injection via object interpolation: configure all object dependencies directly in the config.
  • Use object attribute interpolation for referencing object attributes directly in the config file.

Installation

pip install dicfg
conda install -c conda-forge dicfg

Docs

https://martvanrijthoven.github.io/dicfg/