Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #3381 > unrolled thread

[ANN] Confugue: Hierarchical configuration framework

Started byOndřej Cífka <ondra@cifka.com>
First post2020-04-30 04:06 -0700
Last post2020-04-30 04:06 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python.announce


Contents

  [ANN] Confugue: Hierarchical configuration framework Ondřej Cífka <ondra@cifka.com> - 2020-04-30 04:06 -0700

#3381 — [ANN] Confugue: Hierarchical configuration framework

FromOndřej Cífka <ondra@cifka.com>
Date2020-04-30 04:06 -0700
Subject[ANN] Confugue: Hierarchical configuration framework
Message-ID<47beb547-e90e-4199-bf70-924c18967419@googlegroups.com>
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')


<P><A HREF="https://github.com/cifkao/confugue">Confugue 0.1.1</A>,
a hierarchical configuration framework. (30-Apr-20)</P>

[toc] | [standalone]


Back to top | Article view | comp.lang.python.announce


csiph-web