An immutable dict class providing a hashable, frozen dictionary that can be used as dict keys or in sets. Current version 2025.3, works with Python >=3.7. Released irregularly.
pip install constantdictNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create an immutable dict and demonstrate hashability.
Use constantdict({'key': 'value'}) not constantdict('key', 'value').Access items with .items() which returns a tuple; if you need a dict_items view, convert: items = d.items() works as tuple, but not .viewitems().
Use 'from constantdict import constantdict'.
Pass a single dict or iterable of pairs: constantdict({'a':1}) or constantdict([('a',1)]).No dependency data recorded yet.