Dotty dict-like object allow to access deeply nested keys using dot notation.
Project description
dotty_dict
Safely get nested dict value by dot notation key.
Dotty dict-like object allow to access deeply nested keys using dot notation. Create Dotty from dict or other dict-like object to use magic of Dotty.
Free software: MIT license
Documentation: https://dotty-dict.readthedocs.io.
Features
Accessing deeply nested key using dot notation
Returns None if key does not exist instead of raising KeyError exception
Assigning to deeply nested existing or not yet existing key
Get deeply nested value or provided default value with .get() method
TODO
Escape dot sign to allow accessing keys with dot in it
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2017-05-03)
First release on PyPI.
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
Built Distribution
Hashes for dotty_dict-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66b06a94d01ad080f4698eb49e4ab2f26f33d025d9dfc3f8e3f58746b2acfa71 |
|
MD5 | 772dae1ed8df67f837cf68ef655ccc42 |
|
BLAKE2b-256 | d3d34828feea639306024e33f7c0f338eef5d51a451a66705f5b3cb27308dcd9 |