sortedcollections
Python Sorted Collections
Decision gist · record as of 2026-08-14
Yes, if you need the specific sorted collection types it provides and your codebase targets Python 3.6 through 3.9. No, if you require ongoing maintenance, support for newer Python versions, or active bug fixes—the package is abandoned and has not been updated since 2021-01-18. Consider it stable for legacy codebases but risky for new projects.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction installation with a single pure-Python dependency.
- However, the package is abandoned—last released in January 2021 and has not been updated since—so expect no maintenance, bug fixes, or compatibility updates.
License · maintenance · safety
Apache 2.0 (permissive) — Apache 2.0 permissive license allows free use, modification, and distribution in both open-source and commercial projects with minimal restrictions.
last release 2021-01-18 (2034 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 343,486 downloads/mo, #7,382 on PyPI
Alternatives
Verify before relying
pip install sortedcollections
from sortedcollections import ValueSortedDict
vsd = ValueSortedDict({1: 'a', 2: 'b', 3: 'c'})
print(vsd[0]) # Access by index- Whether the package remains compatible with Python versions beyond 3.9 given the January 2021 release cutoff
- Real-world performance characteristics compared to standard dict/set for typical workloads
- Whether sortedcontainers dependency has received updates that might affect behavior or compatibility
What it is and what it does
Sorted Collections extends the sortedcontainers library with higher-level data structures that combine sorting with indexed access. It provides ValueSortedDict (dictionary sorted by values), ItemSortedDict (with key-function support), NearestDict (nearest-key lookup), OrderedDict and OrderedSet (with numeric indexing), IndexableDict and IndexableSet (numeric indexing on standard types), and SegmentList (fast random-access insertion/deletion). All implementations are pure Python and built on sortedcontainers.
The package is designed for developers who need sorted collections with efficient indexed access rather than the linear cost of standard Python sorted() calls. It was actively maintained through early 2021 but has since been abandoned, meaning no updates for newer Python versions or bug fixes will be released.
Use it for
- Build a leaderboard or ranking system where you need to access top entries by score efficiently
- Implement a cache or priority queue where items must be sorted by value and accessed by position
- Create a time-series data structure where you need both chronological order and fast nearest-key lookup
- Store configuration or metadata where insertion order and numeric indexing matter more than hash-based access
- Develop an interval tree or segment-based data structure for range queries with fast insertion/deletion
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need the specific sorted collection types it provides and your codebase targets Python 3.6 through 3.9.
No, if you require ongoing maintenance, support for newer Python versions, or active bug fixes—the package is abandoned and has not been updated since 2021-01-18. Consider it stable for legacy codebases but risky for new projects.
Install
sortedcollections on PyPI
Before you install
Low friction installation with a single pure-Python dependency. However, the package is abandoned—last released in January 2021 and has not been updated since—so expect no maintenance, bug fixes, or compatibility updates.
License in practice
Apache 2.0 permissive license allows free use, modification, and distribution in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install sortedcollections
from sortedcollections import ValueSortedDict
vsd = ValueSortedDict({1: 'a', 2: 'b', 3: 'c'})
print(vsd[0]) # Access by index
Verify before relying
- Whether the package remains compatible with Python versions beyond 3.9 given the January 2021 release cutoff
- Real-world performance characteristics compared to standard dict/set for typical workloads
- Whether sortedcontainers dependency has received updates that might affect behavior or compatibility
Package facts
| License | Apache 2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesortedcontainers |
| Maintenance | Abandoned 2,034 days since the last release |
| First released | |
| Downloads | 343,486 / month, #7,382 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: sortedcollections-2.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sorted dictionary with indexing”
- sortedcollectionsProvides specialized sorted collection data structures (dictionaries,…
- sortedcontainersProvides sorted list, dict, and set data structures implemented in…
- zope.indexzope.index provides indexing structures for Zope catalogs, including…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also sortedcontainers · ordereddict · ordered-set · orderly-set · collections-extended · orderedmultidict · fractional-indexing · sortedcontainers-stubs · pyroaring · multidict