I'm happy to announce the release of confugue 0.1.1!
Confugue is a hierarchical configuration framework for Python. It provides a
smart wrapper for nested configuration dictionaries (typically loaded from
YAML files), which can automatically fill in function and class parameters
with the configuration values. This eliminates the need for passing these
values around or even explicitly referencing them.
Installation: pip install confugue
Docs: https://confugue.readthedocs.io/
Tutorial for deep learning users: http://tiny.cc/confugue-colab
GitHub: https://github.com/cifkao/confugue/
License: BSD-3-Clause
Confugue is very flexible, allowing for:
- Arbitrary nesting of the configuration file, following the code structure
- Specifying defaults and additional arguments at runtime
- Omitting a whole section of the configuration file if defaults are provided
- Using a list of dicts to configure a list of objects with different
arguments for each
- Overriding the type of an object while preserving the arguments passed by
the caller
- Detecting unused configuration values
Basic example (see docs for examples of the hierarchical machinery):
from confugue import Configuration
cfg = Configuration({'my_obj': {'b': 'bar', 'c': 'baz'}})
# ...or load with Configuration.from_yaml()
obj = cfg['my_obj'].configure(MyClass, a='foo', b='moo')
# Will instantiate MyClass(a='foo', b='bar', c='baz')
https://github.com/cifkao/confugue;>Confugue 0.1.1,
a hierarchical configuration framework. (30-Apr-20)
--
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Support the Python Software Foundation:
http://www.python.org/psf/donations/