Resolve dot notation from dictionary
Project description
pyresolve
![](https://pypi-camo.freetls.fastly.net/c63af252a45c062e133ea741f206022f880e0175/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d676974687562266d6573736167653d70797265736f6c7665266c6162656c436f6c6f723d626c61636b26636f6c6f723d333537326135267374796c653d666c61742d737175617265266c6f676f3d676974687562)
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 |