# immutabledict
![PyPI](https://img.shields.io/pypi/v/immutabledict) ![Conda](https://img.shields.io/conda/vn/conda-forge/immutabledict) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/immutabledict)
![License](https://img.shields.io/pypi/l/immutabledict) ![Build](https://img.shields.io/github/actions/workflow/status/corenting/immutabledict/ci.yml?branch=master) ![Codecov](https://img.shields.io/codecov/c/github/corenting/immutabledict) ![PyPI - Downloads](https://img.shields.io/pypi/dm/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](https://github.com/slezica/python-frozendict). This library is a pure Python, MIT-licensed alternative to the new LGPL-3.0 licensed [frozendict](https://github.com/Marco-Sulla/python-frozendict).
## Installation
Official release in [on pypi](https://pypi.org/project/immutabledict/) as `immutabledict`.
**Community-maintained** releases are available:
- On [conda-forge](https://anaconda.org/conda-forge/immutabledict) as `immutabledict`
- On [various package repositories](https://repology.org/project/python:immutabledict/versions)
## Example
```python
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](https://www.python.org/dev/peps/pep-0584/)
- 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](https://corenting.fr/donate).
Raw data
{
"_id": null,
"home_page": "https://github.com/corenting/immutabledict",
"name": "immutabledict",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "immutable, dictionary",
"author": "Corentin Garcia",
"author_email": "corenting@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e0/c5/4240186fbabc58fba41bbe17c5f0cd37ffd4c0b85a5029ab104f946df175/immutabledict-4.2.1.tar.gz",
"platform": null,
"description": "# immutabledict\n\n![PyPI](https://img.shields.io/pypi/v/immutabledict) ![Conda](https://img.shields.io/conda/vn/conda-forge/immutabledict) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/immutabledict)\n\n![License](https://img.shields.io/pypi/l/immutabledict) ![Build](https://img.shields.io/github/actions/workflow/status/corenting/immutabledict/ci.yml?branch=master) ![Codecov](https://img.shields.io/codecov/c/github/corenting/immutabledict) ![PyPI - Downloads](https://img.shields.io/pypi/dm/immutabledict)\n\nAn 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.\n\nIt's a fork of slezica's [frozendict](https://github.com/slezica/python-frozendict). This library is a pure Python, MIT-licensed alternative to the new LGPL-3.0 licensed [frozendict](https://github.com/Marco-Sulla/python-frozendict).\n\n## Installation\n\nOfficial release in [on pypi](https://pypi.org/project/immutabledict/) as `immutabledict`.\n\n**Community-maintained** releases are available:\n- On [conda-forge](https://anaconda.org/conda-forge/immutabledict) as `immutabledict`\n- On [various package repositories](https://repology.org/project/python:immutabledict/versions)\n\n## Example\n\n```python\nfrom immutabledict import immutabledict\n\nmy_item = immutabledict({\"a\": \"value\", \"b\": \"other_value\"})\nprint(my_item[\"a\"]) # Print \"value\"\n```\n\n## Differences with the old original frozendict package\n\n- Dropped support of EOL Python versions (older versions of the library may support older Python versions)\n- Fixed `collections.Mapping` deprecation warning\n- Typing\n- [PEP 584 union operators](https://www.python.org/dev/peps/pep-0584/)\n- Keep the same signature for `copy()` as `dict` (starting with immutabledict 3.0.0), don't accept extra keyword arguments.\n- Added `set`, `delete` and `discard` methods\n\n## Donations\n\nIf you wish to support this library, donations are possible [here](https://corenting.fr/donate).\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Immutable wrapper around dictionaries (a fork of frozendict)",
"version": "4.2.1",
"project_urls": {
"Bug Tracker": "https://github.com/corenting/immutabledict/issues",
"Changelog": "https://github.com/corenting/immutabledict/blob/master/CHANGELOG.md",
"Documentation": "https://immutabledict.corenting.fr",
"Donation": "https://corenting.fr/donate",
"Homepage": "https://github.com/corenting/immutabledict",
"Repository": "https://github.com/corenting/immutabledict"
},
"split_keywords": [
"immutable",
" dictionary"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "595625ca7b848164b7d93dbd5fc97dd7751700c93e324fe854afbeb562ee2f98",
"md5": "82afb54e90adac43db6ba6a11bcdf100",
"sha256": "c56a26ced38c236f79e74af3ccce53772827cef5c3bce7cab33ff2060f756373"
},
"downloads": -1,
"filename": "immutabledict-4.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "82afb54e90adac43db6ba6a11bcdf100",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4700,
"upload_time": "2024-11-17T13:25:19",
"upload_time_iso_8601": "2024-11-17T13:25:19.520447Z",
"url": "https://files.pythonhosted.org/packages/59/56/25ca7b848164b7d93dbd5fc97dd7751700c93e324fe854afbeb562ee2f98/immutabledict-4.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e0c54240186fbabc58fba41bbe17c5f0cd37ffd4c0b85a5029ab104f946df175",
"md5": "ac3ce87a7507d3e7d44a24a6b6bdb4a7",
"sha256": "d91017248981c72eb66c8ff9834e99c2f53562346f23e7f51e7a5ebcf66a3bcc"
},
"downloads": -1,
"filename": "immutabledict-4.2.1.tar.gz",
"has_sig": false,
"md5_digest": "ac3ce87a7507d3e7d44a24a6b6bdb4a7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6228,
"upload_time": "2024-11-17T13:25:21",
"upload_time_iso_8601": "2024-11-17T13:25:21.555355Z",
"url": "https://files.pythonhosted.org/packages/e0/c5/4240186fbabc58fba41bbe17c5f0cd37ffd4c0b85a5029ab104f946df175/immutabledict-4.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-17 13:25:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "corenting",
"github_project": "immutabledict",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "immutabledict"
}