Skip to main content

Populate variables in a tree-like schema

Project description

Applies values from a flat dict ("environment") to a tree-like structure ("schema").


    >>> from applyenv import apply
    >>> schema = dict(a="A", b=dict(c="C"))
    >>> environ = dict(A=3, C=5)
    >>> apply(schema, environ)
    {'a': 3, b: {'c': 5}} 

Note: feel free to use os.environ to populate env values directly into your schema.

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

ApplyEnv-1.0.57.tar.gz (2.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page