Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yamlconf_wmf-0.2.10-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file yamlconf-wmf-0.2.10.tar.gz.

File metadata

  • Download URL: yamlconf-wmf-0.2.10.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for yamlconf-wmf-0.2.10.tar.gz
Algorithm Hash digest
SHA256 30d21a2331819392885d35877fde171a1f7e169ab5db3e74b98db1b7373f3a4a
MD5 b675cca16284ac41d58f7c21f07ef91d
BLAKE2b-256 5fbbdbac02abe0bc78cfe8c2b2588fe41e732deb223ea9cc534d438dc8acaa1b

See more details on using hashes here.

File details

Details for the file yamlconf_wmf-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: yamlconf_wmf-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for yamlconf_wmf-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 2d56dfd2d9c14ca06a274e001ea61c6097402775ab56e6e203b76fe1e2902a2a
MD5 e5e0e76d155ee382dda6fac0f5289c65
BLAKE2b-256 5f55265fb0d0c3a81dfe98b62dfeea7e71272762bd5140ab289344b5d9b20850

See more details on using hashes here.

Supported by

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