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

Uploaded Source

Built Distribution

yamlconf-0.2.6-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yamlconf-0.2.6.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.26.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.15.0 CPython/3.8.10

File hashes

Hashes for yamlconf-0.2.6.tar.gz
Algorithm Hash digest
SHA256 5a1e646c723f51a212758dbb0f6fb833ab91e1b41f1b87dc3efd17d95e1f5a4e
MD5 e43ca275dae81c63c6ea2989a0d029fb
BLAKE2b-256 3f7d714dc58a3a780b260ee39d776da5a42a3586b1375e9b701d8e356aeffb7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yamlconf-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.26.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.15.0 CPython/3.8.10

File hashes

Hashes for yamlconf-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9a53d7dd5bd7026afbad1dd0beb6c1bb681c497fb3daf08df966eb235629fc07
MD5 b6035a213206cd00ff991cb01ed259fc
BLAKE2b-256 a7e097c505dc8855a4d2e1d11318e135995ca73bb831ee6e8e8f5aebf0cffc9e

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