Registry / data / dotted-dict

dotted-dict

JSON →
library1.1.3pypypi✓ verified 85d ago

DottedDict is a dict subclass that allows accessing nested keys using dot notation (e.g., d.key.subkey). Currently at version 1.1.3. Release cadence is irregular; last update was in 2020.

pip install dotted-dict
INSTALL
IMPORT
SIG · DOTTED-DICT
D
dotted-dict
datapythonv1.1.3
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DottedDict
from dotted_dict import DottedDict
from dotted_dict import dotted_dict
The class is capitalized 'DottedDict'

Creates a DottedDict from a nested dict and accesses nested keys with dot notation.

from dotted_dict import DottedDict d = DottedDict({'a': {'b': 'value'}}) print(d.a.b) # output: value
Debug
Known issues
gotchaDottedDict does not support dot notation assignment for creating new nested keys (e.g., d.new.key = 'value' will raise KeyError because intermediate keys are not auto-created).
fix
Use d['new']['key'] = 'value' or pre-initialize the nested structure.
affects: all
gotchaDottedDict overrides __getattr__ to mimic dict keys, so attributes like d.keys, d.items, d.values are lost. Use d.keys() only on the DottedDict itself; nested DottedDicts also override these.
fix
Access these methods via d.keys() (works on the object) but be aware that nested DottedDicts also override them; use dict(d['inner']).keys() if needed.
affects: all
gotchaDottedDict does not convert non-dict values to DottedDict. Only nested dicts are converted. Lists of dicts remain plain dicts.
fix
Use DottedDict with nested structures; for lists, you must manually convert each element.
affects: all
Errors
Common errors & fixes
KeyError: 'key' when trying to set d.new.key = 'value'
DottedDict does not auto-create intermediate keys on dot assignment.
fix
Set using standard dict assignment: d['new'] = DottedDict({'key': 'value'})
AttributeError: 'DottedDict' object has no attribute 'items'
Accessing .items() on the DottedDict itself works but on nested ones? Actually it doesn't - nested DottedDict does have items method, but the error may occur if the nested value is not a DottedDict.
fix
Ensure nested values are DottedDict or use dict() conversion: dict(d['inner']).items()
Upgrade
Version history
1.1.3latest on PyPI · released Apr 8, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
dotted-dict — pip install dotted-dict · libregistry