Skip to main content

Dotty dict-like object allow to access deeply nested keys using dot notation.

Project description

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.

History

0.1.0 (2017-05-03)

  • First release on PyPI.

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

dotty_dict-0.1.7.tar.gz (13.2 kB view hashes)

Uploaded Source

Built Distribution

dotty_dict-0.1.7-py2.py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page