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.8.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotty_dict-0.1.8-py2.py3-none-any.whl (5.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dotty_dict-0.1.8.tar.gz.

File metadata

  • Download URL: dotty_dict-0.1.8.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dotty_dict-0.1.8.tar.gz
Algorithm Hash digest
SHA256 ad9afc6dc7be91919e2fddb042ccf46d6c59bef752f7398d5cdc784afea649f4
MD5 236a49b30b5557aa72e89666b0d68d12
BLAKE2b-256 608bac1b3eaecd707ce44d1fa510e20e8c2fa74bbbb3b0043294ec9b6ea36e09

See more details on using hashes here.

File details

Details for the file dotty_dict-0.1.8-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dotty_dict-0.1.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d8b78c06def1e4f810b40a5f789e48ca16f4eac7666e6d7596dcfe3f82e7576c
MD5 44d6a9bbdff70ee4c8fe78c5785b7d87
BLAKE2b-256 233a161acefb1650fb386ed06fb9328779b2adf7f1f774306c3a911c03d881d7

See more details on using hashes here.

Supported by

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