dotty_dict

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

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.

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.