Python library to trace path of a particular key inside a nested dict
Project description
trace-dkey
Python library to trace path of a particular key inside a nested dict
Installation
For stable version - pip install trace-dkey
For developement - git clone https://github.com/Agent-Hellboy/trace-dkey - cd trace-dkey - python -m venv .venv - source .venv/bin/activate
Example
>>> from trace_dkey import trace
>>> l={'a':{'b':{'c':{'d':{'e':{'f':1}}}}}}
>>> trace(l,'f')
Found 'f' at a--> b--> c--> d--> e-->f
Now you can query it as l['a']['b']['c']['d']['e']['f']
>>> l['a']['b']['c']['d']['e']['f']
1
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
trace-dkey-0.0.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for trace_dkey-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a56699a39d4e0a76337714b6f4eb05b95ddb45d3985cde2e6f0e5f786e9497f |
|
MD5 | baa25a21f38b79686d9bb77fd743891d |
|
BLAKE2b-256 | f5b0d96c9e24ce88e246b09f839fd43ec9700fdda8ad5a3e847efca203c3fcb9 |