MinCfg
the Minimum Configuration Handling System
There are many configuration management/definition systems. This one is mine. This is an overview. There are also more formal docs.
A set of simple tools to build a configuration system with
The first set are 'sources':
- DictSource, which takes values from a python dict and is useful for defaults
- SubsetSource, which returns a subset of another source, to help with merge precedence
- OSEnvironSource, which parses config values from os.environ into hierarchical dictionaries
- YamlFileSource, which parses a yaml file into hierarchical dictionaires (
pip install mincfg[yaml]for support) - INIFileSource, which understands INI files (based on configobj) (
pip install mincfg[ini]for support) - DotEnvSouce, which understands .env files (based on python-dotenv) (
pip install mincfg[env]for support)
The second tool is:
- MergedConfiguration: which merges multiple configuration sources into a coherent whole
Yes, much more could be done:
- required keys
- value validation
- default parsers
- default default values (that .get() without a default would default to)
- more file types (json, ... xml?)
- sphinx/rtd docs
... PRs accepted!
Much inspiration - and the .get() signature - is taken from everett, but the implementation is all mine.
To install
pip install mincfg
Metadata
Release files for mincfg 0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mincfg-0.9.tar.gz | 45.2 kB | Without provenance | Details for mincfg-0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mincfg-0.9-py3-none-any.whl | Python 3 | none | any | Details for mincfg-0.9-py3-none-any.whl |
Total release size: 79.0 kB
Release files / mincfg-0.9.tar.gz
| Download URL | mincfg-0.9.tar.gz |
|---|---|
| Size | 45.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d748bc3c519475a241d00d72daaa244567b952ceaa94a8bb067aab3acc75a4fa
|
|
BLAKE2b-256 checksum How to use checksums |
85a8450fd6eca665fd0e24eae63a949abbc61712be65f9f37176427695b92048
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / mincfg-0.9-py3-none-any.whl
| Download URL | mincfg-0.9-py3-none-any.whl |
|---|---|
| Size | 33.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc6ab6fd65f9ff2a1438640d7b12af7ae31d0b098873aca1c426de29389d2005
|
|
BLAKE2b-256 checksum How to use checksums |
c286ba36bda7f710cf1b596a25cc58cfa90c093e1745dc22e7d987638fa45433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for mincfg 0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.