grantjenks/python-sortedcontainers
Python Sorted Container Types: Sorted List, Sorted Dict, and Sorted Set observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4573
- days_rel: n/a
- days_push: 908
- n_releases_24m: 0
Adoption not part of the score
3975 stars · 232 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
An Apache2-licensed pure-Python library providing sorted collection types: SortedList, SortedDict, and SortedSet. It uses a segmented-list data structure to achieve performance comparable to C extensions without requiring compilation.
Use cases
- maintain a sorted list with fast insertion and indexing in Python
- implement a priority queue with sorted iteration and membership tests
- build a multiset with efficient min/max lookups
- rank items by their position in a sorted collection
- find nearest neighbors via bisect operations for ML algorithms
- keep a key-value mapping iterated in sorted key order
- store intervals and query overlapping ranges
When to choose
- you need sorted list, dict, or set semantics in pure Python with no C compiler
- you need fast sorted operations on in-memory datasets up to billions of elements
- you want well-documented, benchmarked, 100% test-covered data structures
- you want lower memory overhead than tree-based implementations
When to avoid
- your data does not fit in memory and you need an external or disk-backed store
- you need concurrent or thread-safe sorted collections
- a simple sorted() call or heapq suffices for your workload
Facets
library · maturity stable
developer-tools developer-tools data-science python cross-platform sorted-containers sorted-list sorted-dict sorted-set data-structures pure-python priority-queue performance algorithms
10 sources
- readme: https://github.com/grantjenks/python-sortedcontainers · fetched 2026-08-28 · d2c8f2d178a8
- homepage: http://www.grantjenks.com/docs/sortedcontainers/ · fetched 2026-08-29 · b1a9cee4d8ee
- site_page: http://www.grantjenks.com/docs/sortedcontainers · fetched 2026-08-29 · b1a9cee4d8ee
- site_page: http://www.grantjenks.com/docs/sortedcontainers/implementation.html · fetched 2026-08-29 · 24cacdb48471
- site_page: http://www.grantjenks.com/docs/sortedcontainers/performance.html · fetched 2026-08-29 · 6861c32a5ba2
- site_page: http://www.grantjenks.com/docs/sortedcontainers/introduction.html · fetched 2026-08-29 · d843fd8edeb1
- site_page: http://www.grantjenks.com/docs/sortedcontainers/performance-load.html · fetched 2026-08-29 · 6739e78871a1
- site_page: http://www.grantjenks.com/docs/sortedcontainers/performance-runtime.html · fetched 2026-08-29 · ac9a5f68406e
- site_page: http://www.grantjenks.com/docs/sortedcontainers/performance-workload.html · fetched 2026-08-29 · d830d5b5247c
- site_page: http://www.grantjenks.com/docs/sortedcontainers/performance-scale.html · fetched 2026-08-29 · 561156fbed3f
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| grantjenks/python-sortedcontainers | main | 23 |
For agents
markdown · JSON · MCP: product_card(name="grantjenks/python-sortedcontainers")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem