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 Distribution
yamlconf-0.2.1.tar.gz
(4.5 kB
view details)
Built Distributions
yamlconf-0.2.1-py3.5.egg
(15.3 kB
view details)
File details
Details for the file yamlconf-0.2.1.tar.gz
.
File metadata
- Download URL: yamlconf-0.2.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b86d221383b6c2a7ce53e5512875804b17f0b92ac994c6c43d34deae0ca9088 |
|
MD5 | 0bdb7bc46d33e79d9a855e0a914eca89 |
|
BLAKE2b-256 | 0b46c1db95f75c76530106252b4a2eb8f1120e2403221f10610e85b5b7f80f71 |
File details
Details for the file yamlconf-0.2.1-py3.5.egg
.
File metadata
- Download URL: yamlconf-0.2.1-py3.5.egg
- Upload date:
- Size: 15.3 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 | 444e3b8ae553c267a2a3d3070f98eb79f9792c5804cb77e77823cafaf599a319 |
|
MD5 | db5f0d87d71f5bf7f26467034091f080 |
|
BLAKE2b-256 | f15c67995f511bd540e7c058af448f4d8220049c4233d8e202f6ab5ae4c7b80c |
File details
Details for the file yamlconf-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: yamlconf-0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | deda23c750269219ff497c04a87a655976cdd0ca06f07a22e42d906d08a1a11d |
|
MD5 | 3aeb0225ae1a8ff48adaf6a8a5be6845 |
|
BLAKE2b-256 | e88ccb53f4dcf489882c76b7d9d0051311e0d888bbabc2b02828a7e88113be4f |