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.


pip install attd


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

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

attd-0.4.tar.gz (3.4 kB view hashes)

Uploaded source

Built Distribution

attd-0.4-py3-none-any.whl (4.1 kB view hashes)

Uploaded py3

Supported by

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