Metadata-Version: 2.1
Name: cffm
Version: 0.2.0
Summary: Configuration of Many Sources
Home-page: https://github.com/grgi/cffm
Author: Gregor Giesen
Author-email: gregor@giesen.net
License: LGPL-3.0-or-later
Project-URL: Source, https://github.com/grgi/cffm
Project-URL: Changelog, https://github.com/grgi/cffm/blob/main/CHANGELOG.rst
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Programming Language :: Python
Requires-Python: >=3.10
Description-Content-Type: text/x-rst; charset=UTF-8
Provides-Extra: click
Provides-Extra: node
Provides-Extra: testing
License-File: LICENSE.txt

.. These are examples of badges you might want to add to your README:
   please update the URLs accordingly

    .. image:: https://readthedocs.org/projects/cffm/badge/?version=latest
        :alt: ReadTheDocs
        :target: https://cffm.readthedocs.io/en/stable/
    .. image:: https://img.shields.io/coveralls/github/<USER>/cffm/main.svg
        :alt: Coveralls
        :target: https://coveralls.io/r/<USER>/cffm
    .. image:: https://img.shields.io/pypi/v/cffm.svg
        :alt: PyPI-Server
        :target: https://pypi.org/project/cffm/
    .. image:: https://pepy.tech/badge/cffm/month
        :alt: Monthly Downloads
        :target: https://pepy.tech/project/cffm

.. image:: https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold
    :alt: Project generated with PyScaffold
    :target: https://pyscaffold.org/

|

====
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
