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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yamlconf-wmf-0.2.10.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yamlconf-wmf-0.2.10.tar.gz.
File metadata
- Download URL: yamlconf-wmf-0.2.10.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30d21a2331819392885d35877fde171a1f7e169ab5db3e74b98db1b7373f3a4a
|
|
| MD5 |
b675cca16284ac41d58f7c21f07ef91d
|
|
| BLAKE2b-256 |
5fbbdbac02abe0bc78cfe8c2b2588fe41e732deb223ea9cc534d438dc8acaa1b
|
File details
Details for the file yamlconf_wmf-0.2.10-py3-none-any.whl.
File metadata
- Download URL: yamlconf_wmf-0.2.10-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d56dfd2d9c14ca06a274e001ea61c6097402775ab56e6e203b76fe1e2902a2a
|
|
| MD5 |
e5e0e76d155ee382dda6fac0f5289c65
|
|
| BLAKE2b-256 |
5f55265fb0d0c3a81dfe98b62dfeea7e71272762bd5140ab289344b5d9b20850
|