Skip to main content

Dictionary with attribute access to keys

Project description

Attribute Dictionary

Build Status PyPI

attd is a Python package that provides a dictionary with attribute access to keys. It is especially convenient when working with deeply nested data from JSON APIs.

Installation

pip install attd

Documentation

>>> from attd import AttributeDict
>>> data = AttributeDict({"a": {"b": {"c": 1}}})
>>> data["a"]["b"]["c"]
1
>>> data.a.b.c
1
>>> from attd import FallbackAttributeDict
>>> data = FallbackAttributeDict({})
>>> data["a"]["b"]["c"]
FallbackAttributeDict()
>>> data.a.b.c
FallbackAttributeDict()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for attd, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size attd-0.4-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size attd-0.4.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page