All Projects → corenting → immutabledict

corenting / immutabledict

Licence: MIT License
A fork of frozendict, an immutable wrapper around dictionaries for Python3

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to immutabledict

js-data-structures
🌿 Data structures for JavaScript
Stars: ✭ 56 (+180%)
Mutual labels:  immutable, dict
finger-tree
🌵 Finger tree data structure for JavaScript
Stars: ✭ 20 (+0%)
Mutual labels:  immutable
myConsole
基于 TS + React + Mobx 实现的移动端浏览器控制台开发教程
Stars: ✭ 26 (+30%)
Mutual labels:  immutable
Species-Names-Corpus
物种名称语料库。植物名,动物名。
Stars: ✭ 23 (+15%)
Mutual labels:  dict
fermor
Fast, powerful, general-purpose graph traversal and modelling tools plus a performant immutable in-memory graph database.
Stars: ✭ 22 (+10%)
Mutual labels:  immutable
constant.js
Immutable/Constant Objects for JavaScript
Stars: ✭ 18 (-10%)
Mutual labels:  immutable
persian-date-time
Persian Date Time
Stars: ✭ 54 (+170%)
Mutual labels:  immutable
Medical-Names-Corpus
医疗语料库。医疗机构名语料库。药品本位码。
Stars: ✭ 26 (+30%)
Mutual labels:  dict
create-react-redux-app
React boilerplate based on create-react-app
Stars: ✭ 49 (+145%)
Mutual labels:  immutable
core
The framework for huge projects, with a focus on maintainability
Stars: ✭ 18 (-10%)
Mutual labels:  immutable
constantie
A tiny JavaScript library for creation of fully immutable objects and arrays
Stars: ✭ 16 (-20%)
Mutual labels:  immutable
converter
Immutable PHP currency converter that's data-agnostic.
Stars: ✭ 77 (+285%)
Mutual labels:  immutable
nft.storage
😋 Free decentralized storage and bandwidth for NFTs on IPFS and Filecoin.
Stars: ✭ 309 (+1445%)
Mutual labels:  immutable
dotty dict
Dictionary wrapper for quick access to deeply nested keys.
Stars: ✭ 67 (+235%)
Mutual labels:  dict
zedux
⚡ A high-level, declarative, composable form of Redux https://bowheart.github.io/zedux/
Stars: ✭ 43 (+115%)
Mutual labels:  immutable
fastener
Functional Zipper for manipulating JSON
Stars: ✭ 54 (+170%)
Mutual labels:  immutable
Remute
C# library to create new immutable object applying lambda expressions to the existing immutable object
Stars: ✭ 57 (+185%)
Mutual labels:  immutable
ienumerable
Deep immutable, Lightweight Enumerable with superpowers
Stars: ✭ 63 (+215%)
Mutual labels:  immutable
universal-routed-flux-demo
The code in this repo is intended for people who want to get started building universal flux applications, with modern and exciting technologies such as Reactjs, React Router and es6.
Stars: ✭ 31 (+55%)
Mutual labels:  immutable
venum
Verifiably better, validated Enum for Python
Stars: ✭ 31 (+55%)
Mutual labels:  immutable

immutabledict

PyPI Conda PyPI - Python Version

License Build Codecov PyPI - Downloads

A fork of frozendict, an immutable wrapper around dictionaries.

It implements the complete mapping interface and can be used as a drop-in replacement for dictionaries where immutability is desired. The immutabledict constructor mimics dict, and all of the expected interfaces (iter, len, repr, hash, getitem) are provided. Note that an immutabledict does not guarantee the immutability of its values, so the utility of hash method is restricted by usage.

The only difference is that the copy() method of immutable takes variable keyword arguments, which will be present as key/value pairs in the new, immutable copy.

Installation

Available as immutabledict on :

  • pypi
  • conda-forge (community-maintained, not an official release)

Example

from immutabledict import immutabledict

my_item = immutabledict({"a": "value", "b": "other_value"})
print(my_item["a"]) # Print "value"

Differences with frozendict

  • Dropped support of Python < 3.6 (version 1.0.0 supports Python 3.5)
  • Fixed collections.Mapping deprecation warning
  • Typing
  • PEP 584 union operators
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].