Configuration utility to ease navigation of local and system configurations
Installation
From the project root directory:
$ python setup.py install
Or install with pip:
$ pip install confutil
Usage
Example:
from confutil import Config
conf = Config('spam')
password = conf['password']
That will pull the first password value from a search through this sequence:
./.spam.conf
./.spam.cfg
~/.spam.conf
~/.spam.cfg
~/.config/.spam.conf
~/.config/.spam.cfg
~/.config/spam/config.conf
~/.config/spam/config.cfg
~/.config/spam/config
/etc/.spam.conf
/etc/.spam.cfg
/etc/spam/config.conf
/etc/spam/config.cfg
/etc/spam/config
To write out a loaded configuration:
from confutil import Config
c = Config('myapp')
c.write('output_path.cfg')
To print a derived configuration from the current directory, run:
$ confutil $PROJECT_NAME
To output it to a new file, run:
$ confutil $PROJECT_NAME -o output_path.cfg
Release Notes
- 0.1.3:
Add get_in(key) and get_as(key, type=str)
- 0.0.1:
Project created
Metadata
Release files for confutil 0.1.4
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 |
|---|---|---|---|---|
| confutil-0.1.4.tar.gz | 5.4 kB | Without provenance | Details for confutil-0.1.4.tar.gz |
Release files / confutil-0.1.4.tar.gz
| Download URL | confutil-0.1.4.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65849a582468464bec64104cd4f893e8def20cd4dca114a84c9b228a73ecf3b0
|
|
BLAKE2b-256 checksum How to use checksums |
d77f92ae734a9b2f893958b0ea05c2179e948e7b98d0234073a20b1634ba1dea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for confutil 0.1.4
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.