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 details)
File details
Details for the file ApplyEnv-1.0.57.tar.gz.
File metadata
- Download URL: ApplyEnv-1.0.57.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e3118de41a20d35ac5afd9e26bd761d1aec44cc36fea7b760be88df96d1ed01
|
|
| MD5 |
8d2ef56c4d8784d978ce326acf4796db
|
|
| BLAKE2b-256 |
29ec25ad8d436763fdb31f0d7035ccaadef6015a06e913b8ee7e54d3b4dd92fb
|