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
Release history Release notifications | RSS feed
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)