A loader interface around multiple config file formats.
Project description
plaster is a loader interface around multiple config file formats. It exists to define a common API for applications to use when they wish to load configuration. The library itself does not aim to handle anything except a basic API for applications to depend on. Any specific constraints should be implemented in a pluggable loader which can be registered via an entrypoint.
Usage
Applications should use plaster to load settings from named sections in a configuration source (usually a file).
Most applications will want to use plaster.get_settings(uri, section=None, defaults=None) to load the settings from a named section. It is possible to specify the section name in the uri itself via the uri#section syntax but it will be overridden by any explicit section parameter.
import plaster
settings = plaster.get_settings('development.ini#main')
Acknowledgments
This API is heavily inspired by conversations, contributions, and design put forth in https://github.com/inklesspen/montague and https://metaclassical.com/announcing-montague-the-new-way-to-configure-python-applications/.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for plaster-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d56c4e1dc6d17d8e9ffb200cb0e10e6c86af70f4dd565ce808f895987096ca09 |
|
MD5 | 528c462729503b0cc93f3eba15fb028d |
|
BLAKE2b-256 | 089bb429c80369020513ae34f5c2f76518c495c768d9afad1dfb88ee4e517640 |