Skip to main content

Immutable wrapper around dictionaries (a fork of frozendict)

Project description

immutabledict

PyPI Conda PyPI - Python Version

License Build Codecov PyPI - Downloads

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:

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() as dict (starting with immutabledict 3.0.0), don't accept extra keyword arguments.
  • Added set, delete and discard methods

Donations

If you wish to support this library, donations are possible here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

immutabledict-4.2.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

immutabledict-4.2.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for immutabledict-4.2.1.tar.gz
Algorithm Hash digest
SHA256 d91017248981c72eb66c8ff9834e99c2f53562346f23e7f51e7a5ebcf66a3bcc
MD5 ac3ce87a7507d3e7d44a24a6b6bdb4a7
BLAKE2b-256 e0c54240186fbabc58fba41bbe17c5f0cd37ffd4c0b85a5029ab104f946df175

See more details on using hashes here.

Provenance

The following attestation bundles were made for immutabledict-4.2.1.tar.gz:

Publisher: ci.yml on corenting/immutabledict

Attestations:

File details

Details for the file immutabledict-4.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for immutabledict-4.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c56a26ced38c236f79e74af3ccce53772827cef5c3bce7cab33ff2060f756373
MD5 82afb54e90adac43db6ba6a11bcdf100
BLAKE2b-256 595625ca7b848164b7d93dbd5fc97dd7751700c93e324fe854afbeb562ee2f98

See more details on using hashes here.

Provenance

The following attestation bundles were made for immutabledict-4.2.1-py3-none-any.whl:

Publisher: ci.yml on corenting/immutabledict

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page