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.1.zip
(5.6 kB
view hashes)
yamlconf-0.0.1.tar.gz
(3.0 kB
view hashes)