--- id: jaraco-collections version: "5.2.1" license: MIT license_treatment: permissive maintenance: active --- # jaraco.collections — Collection objects similar to those in stdlib by jaraco License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does jaraco.collections supplements Python's standard collections module with specialized mapping and container classes designed for common patterns that the stdlib doesn't directly address. It provides RangeMap for key lookups across ranges, case-insensitive keyed dicts, bijective maps where values map back to keys, immutable FrozenDict, and several other utility containers like DictStack for scope management and WeightedLookup for probabilistic selection. The package is a lightweight addition to your toolkit—it has only one runtime dependency and installs as a pure Python wheel. It's actively maintained and has been in production use since 2015-02-16, making it suitable for projects that need these specific collection patterns without building custom implementations. Use it for: - Use RangeMap when you need to map ranges of numeric values to results, like scoring systems or tier-based lookups. - Use FoldedCaseKeyedDict for case-insensitive configuration or lookup tables where key matching should ignore case. - Use BijectiveMap when you need bidirectional mapping where both keys and values are valid lookups. - Use FrozenDict when you need an immutable, hashable mapping to use as a dict key or in sets. - Use DictStack to manage nested scopes or configuration layers that inherit from parent contexts. - Use WeightedLookup to select items probabilistically based on assigned weights. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides specialized collection classes that extend Python's standard library collections module, including range-based mappings, case-insensitive dicts, bijective maps, and other utility containers. Yes. The package offers genuine utility for common collection patterns, has low install friction, no known vulnerabilities, and is actively maintained under a permissive MIT license. Install it if your code needs any of its specialized mappings; otherwise, it's not a required dependency. ## Install pip install jaraco-collections uv add jaraco-collections poetry add jaraco-collections ## Installing jaraco.collections Before you install: Low install friction with a single runtime dependency. The package is actively maintained with a recent commit on 2026-04-13 and has been stable since its first release in 2015-02-16. License in practice: MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal restrictions. Quickstart: pip install jaraco.collections from jaraco.collections import RangeMap rm = RangeMap() rm[range(0, 5)] = 'low' rm[range(5, 15)] = 'high' print(rm[3]) Requires Python 3.9 or later. Verify before relying: - Whether FrozenDict is truly hashable and suitable for use as dict keys in all scenarios - Performance characteristics of RangeMap and WeightedLookup with large datasets - Whether ItemsAsAttributes correctly handles all edge cases with reserved attribute names ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags specialized dict implementations, range-based mapping, case-insensitive dictionary, bijective map, collection utilities, advanced mapping classes, immutable hashable dict, data-structures, stdlib-supplement [View on SkillFed](https://skillfed.io/packages/jaraco-collections) · [View on PyPI](https://pypi.org/project/jaraco-collections/)