dotty_dict

https://img.shields.io/pypi/v/dotty_dict.svg https://img.shields.io/travis/pawelzny/dotty_dict.svg Documentation Status Updates

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.

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.