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", False) # False
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-0.1.0.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for pyresolve-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 960e5abaa227c69c4b8ddeb7265ae9c36460400274e2a5729072d830778af3c4 |
|
MD5 | d24fba2be78bed7f103fc7380de42fe6 |
|
BLAKE2b-256 | 7483129279c929d5d9793467f073ab8731d38c48380458480c1292f7459917a2 |