Immutable wrapper around dictionaries (a fork of frozendict)
Project Links
Meta
Author: Corentin Garcia
Requires Python: >=3.8,<4.0
Classifiers
Development Status
- 5 - Production/Stable
Programming Language
- Python :: 3 :: Only
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
- Python :: 3.8
- Python :: 3.9
- Python :: 3
- Python :: Implementation :: CPython
- Python :: Implementation :: PyPy
Topic
- Software Development :: Libraries :: Python Modules
immutabledict
An immutable wrapper around dictionaries. immutabledict implements the complete mapping interface and can be used as a drop-in replacement for dictionaries where immutability is desired.
It's a fork of slezica's frozendict. This library is a pure Python, MIT-licensed alternative to the new LGPL-3.0 licensed frozendict.
Installation
Official release in on pypi as immutabledict
.
Community-maintained releases are available:
- On conda-forge as
immutabledict
- On various package repositories
Example
from immutabledict import immutabledict
my_item = immutabledict({"a": "value", "b": "other_value"})
print(my_item["a"]) # Print "value"
Differences with the old original frozendict package
- Dropped support of EOL Python versions (older versions of the library may support older Python versions)
- Fixed
collections.Mapping
deprecation warning - Typing
- PEP 584 union operators
- Keep the same signature for
copy()
asdict
(starting with immutabledict 3.0.0), don't accept extra keyword arguments. - Added
set
,delete
anddiscard
methods
Donations
If you wish to support this library, donations are possible here.
Oct 12, 2025
4.2.2
Nov 17, 2024
4.2.1
Mar 06, 2024
4.2.0
Dec 16, 2023
4.1.0
Nov 25, 2023
4.0.0
Jul 21, 2023
3.0.0
Jul 04, 2023
2.2.5
Apr 02, 2023
2.2.4
Nov 07, 2022
2.2.3
Oct 26, 2022
2.2.2
Oct 11, 2021
2.2.1
Aug 28, 2021
2.2.0
Jul 16, 2021
2.1.0
May 20, 2021
2.0.0
Apr 09, 2021
1.3.0
Dec 24, 2020
1.2.0
Oct 28, 2020
1.1.0
Mar 12, 2020
1.0.0
Jan 20, 2020
0.2.0
Jan 11, 2020
0.1.2
Wheel compatibility matrix
Files in release
No dependencies