SortedContainers is an Apache2 Licensed containers library, written in pure-Python, and fast as C-extensions.
# Features
Pure-Python
Fully documented
Benchmark comparison (alternatives, runtimes, load-factors)
100% test coverage
Hours of stress testing
Performance matters (often faster than C implementations)
Compatible API (nearly identical to popular blist and rbtree modules)
Feature-rich (e.g. get the five largest keys in a sorted dict: d.iloc[-5:])
Pragmatic design (e.g. SortedSet is a Python set with a SortedList index)
Developed on Python 2.7
Tested on CPython 2.6, 2.7, 3.2, 3.3, 3.4 and PyPy 2.2+, PyPy3 2.3.1+
Commercial Use
Modify
Distribute
Place Warranty
Sub-License
Private Use
Use Patent Claims
Hold Liable
Use Trademarks
Include Copyright
State Changes
Include License
Include Notice
These details are provided for information only. No information here is legal advice and should not be used as such.
There are no reported vulnerabilities
30 Day SummaryJul 2 2025 — Aug 1 2025
|
12 Month SummaryAug 1 2024 — Aug 1 2025
|