Yaml-based configuration file reader. This is a fork of the original yamlfconf package. This fork is maintained by WMF Machine Learning Team
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-wmf-0.2.10.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for yamlconf_wmf-0.2.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d56dfd2d9c14ca06a274e001ea61c6097402775ab56e6e203b76fe1e2902a2a |
|
MD5 | e5e0e76d155ee382dda6fac0f5289c65 |
|
BLAKE2b-256 | 5f55265fb0d0c3a81dfe98b62dfeea7e71272762bd5140ab289344b5d9b20850 |