Skip to main content

Yaml-based configuration file reader.

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


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.4.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

yamlconf-0.2.4-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file yamlconf-0.2.4.tar.gz.

File metadata

  • Download URL: yamlconf-0.2.4.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.5

File hashes

Hashes for yamlconf-0.2.4.tar.gz
Algorithm Hash digest
SHA256 15de918064bd04298a7b541bfcdae847c3d3f1f8f2ac6c72d416e7be14b9a4d1
MD5 07bdfd523b1386c963fb573a71a65ca2
BLAKE2b-256 a00d50f1df4a8c1949b354b60c7efab64ef4a014529cb03d80e3c799881ea152

See more details on using hashes here.

File details

Details for the file yamlconf-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: yamlconf-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.5

File hashes

Hashes for yamlconf-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ef1cda03c76b2e2d9f6183ea0cf01a8cc344166afd2d7c1c84617c3dd45bf7e5
MD5 923aabadb556c45f7edb6714f5c24643
BLAKE2b-256 bee95f7a39507acb0baebdde18e884d11756a2b2ce29ad513aa00a955f62349a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page