Resolve dot notation from dictionary
Project description
pyresolve
Resolve dot notation from dictionary
from pyresolve import resolve
my_dictionary = {"out":{"middle":{"in":"Balue"}}}
resolve(my_dictionary, "out.middle.in") # "Balue"
Does not break for missing properties
resolve(my_dictionary, "outer.missing.something") # None
Can specify a different default value
resolve(my_dictionary, "outer.missing.something", []) # []
Install
pip install pyresolve
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
pyresolve-1.0.0.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for pyresolve-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d252a0149c5af6c2c80acd96ddb6fc0de12639b4b4f720416c22f674a30a9b8e |
|
MD5 | a0d9cb8452363d2b8689454df76c58ab |
|
BLAKE2b-256 | cd328cea47016adf08cb54f23fe9e4bea45ca8219a6811cd4cf59862e5bedfb0 |