{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/3"}],"enrichment":{"capability":"Provides an immutable mapping type backed by a Hash Array Mapped Trie (HAMT) data structure, offering O(log N) performance for get and set operations with hashable, comparable, and pickleable Map objects.","skillfed_tags":["immutable-data-structures","functional-programming","concurrency-safe"],"use_cases":["Use it for context variables and thread-local state where immutability prevents accidental mutations across async tasks","Use it as keys in dictionaries or set members where hashability and immutability are required","Use it in functional programming patterns where data transformations produce new collections without side effects","Use it in concurrent or multi-threaded code to avoid synchronization overhead on shared data structures","Use it for configuration objects that must remain unchanged after creation"],"what_it_does":"immutables provides a Hash Array Mapped Trie\u2013based immutable mapping for Python, implementing the collections.abc.Mapping interface. It's the same data structure used in CPython's contextvars module (PEP 567). The Map type is hashable and pickleable, making it suitable for use as dictionary keys or in concurrent contexts where mutability is a liability.\n\nSince Maps are immutable, mutations return new derived Maps rather than modifying in place. The package offers both single-operation methods (set, delete) and a MapMutation context manager for batching changes efficiently before finalizing a new Map. It has no runtime dependencies and supports Python 3.8 and later across CPython implementations on macOS, Linux, and Windows.","worth_installing":"Yes, if you need immutable mappings for functional patterns, concurrent code, or as hashable dictionary keys. The HAMT implementation offers solid performance and is battle-tested in CPython itself. Install friction is moderate due to compiled extensions, but wheels cover all major platforms. Maintenance is aging (no release in 9+ months), so not suitable for projects requiring active upstream support, but stable for established use."},"id":"immutables","links":{"html":"https://skillfed.io/packages/immutables","md":"https://skillfed.io/packages/immutables.md","pypi":"https://pypi.org/project/immutables/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-10-10","license_spdx":null,"license_treatment":"permissive","name":"immutables","python_support":"supports_current","summary":"Immutable Collections"},"popularity":{"monthly_downloads":2948816,"position":2811,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.21"}
