cffm

Configuration of Many Sources


License
Other
Install
pip install cffm==0.2.6

Documentation

Project generated with PyScaffold

cffm

Configuratio ex Fontibus Multis - Configuration from many sources

The purpose of this library is to provide a flexible framework for an application's/library's configuration:

  • [x] Multiple sources with precedence, e.g. default values < config files < environmental variables
  • [x] Static typing with documentation
  • [x] Extension via Sections
  • [ ] Source validation
  • [ ] Autogenerate example config files

Example

>>> from cffm import config, field, section
>>> @config
... class AppConfig:
...     loglevel: int = field(1, description="Loglevel")
...     @section('bar')
...     class BarConfig:
...          foo: int
...          baz: bool = False