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 that applications may use to find and load configuration settings. 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')
Read the documentation for more information on using plaster in your application as well as how to create custom loaders.
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.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98df254083b92d491e9d7423290359e52d636eff62ce5917e12bf8bfa898e153 |
|
MD5 | c28d799587200f6016351d3f59e5b5ca |
|
BLAKE2b-256 | 91a08ea1ecf1c169d6430dfe63dff20d64fd1b9d655496cd8b67376eab459c5a |