This library provides a means to read yaml configuration files and propagate default values in reasonable ways. Nothing complicated.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
yamlconf-0.0.3.zip
(5.5 kB
view details)
yamlconf-0.0.3.tar.gz
(2.9 kB
view details)
Built Distribution
yamlconf-0.0.3-py3.4.egg
(3.5 kB
view details)
File details
Details for the file yamlconf-0.0.3.zip
.
File metadata
- Download URL: yamlconf-0.0.3.zip
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97013abee9b0f8f4172e0917b56856daf8a4064df2480e315fcc2513addf1c60 |
|
MD5 | 7fce9a401b44f5eddcdfa3e8831f1ab6 |
|
BLAKE2b-256 | 3ab2c1efdaed67f29dc0e50d994438822d1a14b55d1adac07677598ac668a6d6 |
File details
Details for the file yamlconf-0.0.3.tar.gz
.
File metadata
- Download URL: yamlconf-0.0.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f53c9ca1ab2978cba670b36c41664c91751f84dd12a174e1c770c0b627bac6c |
|
MD5 | e25689d21fdd1a9f817e7c891aef3484 |
|
BLAKE2b-256 | ce95a29239bbf271bea02de926e21a802f706f8a01c602eec6b8c6ede8dc707c |
File details
Details for the file yamlconf-0.0.3-py3.4.egg
.
File metadata
- Download URL: yamlconf-0.0.3-py3.4.egg
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.15.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52027a79dfbaaa19179ad59fe72d64af738a49034eb6e2e29a0ce2197458f9ac |
|
MD5 | 5ecd6165f78df942fa8db344fececb43 |
|
BLAKE2b-256 | 0c10e1f99539dff6bc4448c0cee4fd76b3f2b3109d63de936f264f21f3b2daf3 |