This library provides a means to read yaml configuration files and propagate default values in reasonable ways. Nothing complicated.
Installation: pip install yamlconfig
- Example:
>>> import yamlconf >>> >>> doc = yamlconf.loads(""" ... test: demo_test ... ... tests: ... defaults: ... foo: 5 ... demo_test: ... bar: 6 ... """) >>> >>> doc['tests'][doc['test']]['foo'] 5 >>> doc['tests'][doc['test']]['bar'] 6- Functions:
load(file-like) : Returns a dict with defaults propagated
loads(string) : Returns a dict with defaults propagated
load_module(class-path) : Imports and returns
Metadata
Release files for yamlconf 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yamlconf-0.2.7-py3-none-any.whl | Python 3 | none | any | Details |
Release files / yamlconf-0.2.7-py3-none-any.whl
| Download URL | yamlconf-0.2.7-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9075edfe35dceb83a262d8823dc32abdb35284ad1f9b169b6939d188e31dc3c
|
|
BLAKE2b-256 checksum How to use checksums |
5935edaa32ae3ccb5d0e65c171c70451b16da9031d055363b9c5c90a29d76033
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|