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").

Examples

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