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", []) # []
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 |