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.3.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

immutabledict-4.3.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file immutabledict-4.3.1.tar.gz.

File metadata

  • Download URL: immutabledict-4.3.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for immutabledict-4.3.1.tar.gz
Algorithm Hash digest
SHA256 f844a669106cfdc73f47b1a9da003782fb17dc955a54c80972e0d93d1c63c514
MD5 8ed06e3692bae4d1df1a8818d9013ba2
BLAKE2b-256 1de6718471048fea0366c3e3d1df3acfd914ca66d571cdffcf6d37bbcd725708

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on corenting/immutabledict

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: immutabledict-4.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for immutabledict-4.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9facdc0ff30fdb8e35bd16532026cac472a549e182c94fa201b51b25e4bf7bf
MD5 41ce0bc305da92d46574e9175576f98f
BLAKE2b-256 a3cef9018bf69ae91b273b6391a095e7c93fa5e1617f25b6ba81ad4b20c9df10

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on corenting/immutabledict

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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