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.3.tar.gz
(4.6 kB
view details)
Built Distributions
yamlconf-0.2.3-py3.5.egg
(17.1 kB
view details)
File details
Details for the file yamlconf-0.2.3.tar.gz
.
File metadata
- Download URL: yamlconf-0.2.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab5495560aca5d8500a6206cbb65babf1140d14f874ee00b347a05f59e4b887d |
|
MD5 | 83229e89bd36fd560f439d3d5d927d3f |
|
BLAKE2b-256 | 531af34c3a3265136d90774947098efac19eb28a15adb22e3a119caaf02acca0 |
File details
Details for the file yamlconf-0.2.3-py3.5.egg
.
File metadata
- Download URL: yamlconf-0.2.3-py3.5.egg
- Upload date:
- Size: 17.1 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 | 8945ac6ff89748792669c4bc92003f92edd8500835f26886b856232f9482e235 |
|
MD5 | c391ae65919d241a37b9da9b2b1ef1bd |
|
BLAKE2b-256 | a07f5d08403ce0c587e317b7ee1a308ddaba75c3483a112d8b504fa76232732c |
File details
Details for the file yamlconf-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: yamlconf-0.2.3-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e5f10a0ea20ff63a3b93618798a29b1793be1e9b26b857707f691e84952098e |
|
MD5 | 791a84602126a3f7081a99599fa1b2bd |
|
BLAKE2b-256 | 612cdbdb25cc7da6f1c066365a3d329794007e46f18ed89ddda97605994cf93f |