Install & Compatibility
Where this runs
tested against v1.2.2 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.012s · 19.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.4s · import 0.012s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
deflate
✓ from deflate_dict import deflate
✗ from deflate_dict.deflate import deflate
Top-level import is preferred.
inflate
✓ from deflate_dict import inflate
✗ from deflate_dict.inflate import inflate
Top-level import is preferred.
Deflate a nested dict and inflate it back.
from deflate_dict import deflate, inflate
nested = {'a': {'b': 1, 'c': 2}}
flat = deflate(nested)
print(flat) # {'a.b': 1, 'a.c': 2}
restored = inflate(flat)
print(restored) # {'a': {'b': 1, 'c': 2}}
Errors
Common errors & fixes
TypeError: unhashable type: 'list'
Passing a list as a value deeply nested; deflate expects dicts as nested structures.
fixEnsure nested values are dicts, not lists. Wrap lists in a dict if needed.
KeyError: 'some.path'
Inflation attempted on a flat dict missing some expected keys or using wrong separator.
fixCheck that the flat dict contains keys exactly matching the deflated output, or use custom separator consistently.
Upgrade
Version history
1.2.2latest on PyPI · released Oct 26, 2024
Audit
Dependencies
No dependency data recorded yet.