dotty_dict¶
Dotty dictionary with support_for[‘dot.notation.keys’].
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.
Ultimate goal is to match all Python dictionary method to work with deeply nested Dotty keys.
- Free software: MIT license
- Documentation: https://dotty-dict.readthedocs.io.
Features¶
- Access and assign deeply nested dictionary key using dot notation
- Return None if key doesn’t exist instead of KeyError exception
- Get deeply nested value or default value with .get() method
TODO
- Escape dot char for dictionary keys with dot: dotty_dict[‘strange.key’]
- Check if key exists in deeply nested dictionary: ‘deeply.nested’ in dotty_dict
- Delete deeply nested keys: del dotty_dict[‘deeply.nested’]
Credits¶
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.