--- id: attrdict version: "2.0.1" license: MIT License license_treatment: permissive maintenance: abandoned --- # attrdict — A dict with attribute-style access License: permissive · Maintenance: abandoned · Downloads: 1.8M/mo ## What it is and what it does AttrDict wraps Python dictionaries to allow accessing values as object attributes instead of only as keys. For example, a dict {'foo': 'bar'} can be accessed as obj.foo instead of obj['foo']. The package provides three classes—AttrMap, AttrDict, and AttrDefault—each with slightly different behavior; AttrDict subclasses dict itself, AttrMap is a lighter MutableMapping, and AttrDefault behaves like defaultdict with automatic key creation. By default, nested dicts and sequences are recursively converted to Attr objects, so you can chain attribute access: obj.settings.db.host works naturally. The main use case is building hierarchical configuration or settings objects from YAML, JSON, or nested dicts, where dot notation is more readable than repeated bracket access. The package is small, has low install friction, and depends only on six. However, it has been archived since 2019 with no active maintenance, so compatibility with modern Python versions and edge cases discovered after that date are not guaranteed. Use it for: - Loading and accessing YAML configuration files as nested attribute objects instead of deeply nested dict lookups. - Building hierarchical settings objects where database credentials, API keys, and other config live in nested dicts accessed via dot notation. - Converting API responses (JSON dicts) into objects with attribute access for cleaner, more readable client code. - Merging multiple configuration dicts using the + operator with automatic recursive merging of nested structures. - Creating on-the-fly attribute objects from unstructured data where missing keys should auto-create with a default factory (AttrDefault). ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides dictionary-like objects that allow accessing and modifying elements using both attribute notation (obj.key) and bracket notation (obj['key']), with automatic recursive conversion of nested dicts and sequences. Yes, if you are working in a codebase already using it or need lightweight attribute-style dict access in a stable, unchanging environment. No, if you require active maintenance, Python version compatibility assurance, or expect to rely on bug fixes—the package is archived and unmaintained since 2019. For new projects, consider whether a modern alternative better fits your maintenance and compatibility expectations. ## Install pip install attrdict uv add attrdict poetry add attrdict ## Installing attrdict Before you install: Installation is straightforward with no compiled dependencies. However, the package is archived and has not been maintained since 2019—over six years without updates. While it depends only on six, the lack of maintenance means no fixes for Python version changes or edge cases discovered after the last release. License in practice: Released under the MIT License, which is permissive and imposes no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: pip install attrdict from attrdict import AttrDict a = AttrDict({'foo': 'bar'}) print(a.foo) # 'bar' print(a['foo']) # 'bar' Verify before relying: - Whether the package remains compatible with Python versions released after 2019 without active testing or maintenance. - Whether recursive assignment limitations documented for AttrDict (shallow-copy caveat) affect real-world usage patterns significantly. ## Package facts - License: MIT License (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 1.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags attribute access dictionary, dict with dot notation, nested dict attribute access, hierarchical config objects, mutable mapping with attributes, settings object from dict, recursive dict wrapper, config-management, dict-wrapper, legacy-unmaintained [View on SkillFed](https://skillfed.io/packages/attrdict) · [View on PyPI](https://pypi.org/project/attrdict/)