Immutable wrapper around dictionaries (a fork of frozendict)
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file immutabledict-4.2.1.tar.gz
.
File metadata
- Download URL: immutabledict-4.2.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d91017248981c72eb66c8ff9834e99c2f53562346f23e7f51e7a5ebcf66a3bcc |
|
MD5 | ac3ce87a7507d3e7d44a24a6b6bdb4a7 |
|
BLAKE2b-256 | e0c54240186fbabc58fba41bbe17c5f0cd37ffd4c0b85a5029ab104f946df175 |
Provenance
The following attestation bundles were made for immutabledict-4.2.1.tar.gz
:
Publisher:
ci.yml
on corenting/immutabledict
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
immutabledict-4.2.1.tar.gz
- Subject digest:
d91017248981c72eb66c8ff9834e99c2f53562346f23e7f51e7a5ebcf66a3bcc
- Sigstore transparency entry: 149349353
- Sigstore integration time:
- Predicate type:
File details
Details for the file immutabledict-4.2.1-py3-none-any.whl
.
File metadata
- Download URL: immutabledict-4.2.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c56a26ced38c236f79e74af3ccce53772827cef5c3bce7cab33ff2060f756373 |
|
MD5 | 82afb54e90adac43db6ba6a11bcdf100 |
|
BLAKE2b-256 | 595625ca7b848164b7d93dbd5fc97dd7751700c93e324fe854afbeb562ee2f98 |
Provenance
The following attestation bundles were made for immutabledict-4.2.1-py3-none-any.whl
:
Publisher:
ci.yml
on corenting/immutabledict
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
immutabledict-4.2.1-py3-none-any.whl
- Subject digest:
c56a26ced38c236f79e74af3ccce53772827cef5c3bce7cab33ff2060f756373
- Sigstore transparency entry: 149349355
- Sigstore integration time:
- Predicate type: