$npx skillfedfor your agent

sortedcontainers-stubs

Type stubs for sortedcontainers

With conditionsPyPI Software DevelopmentReleased Apr 20251.1M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — sortedcontainers_stubs-2.4.3-py3-none-any.whl
v2.4.3 · released 2025-04-23 · Python <4.0,>=3.9 · 2 runtime deps: sortedcontainers, typing-extensions

Yes, if you use sortedcontainers and run mypy or another type checker. The package is low-friction to install, has no known vulnerabilities, and is actively maintained. The aging status reflects infrequent releases rather than abandonment—the repo is not archived and received a commit in April 2025. Install it alongside sortedcontainers to get full type coverage.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later; sortedcontainers must also be installed as a runtime dependency.
  • Low friction install as a pure stub package with only sortedcontainers and typing-extensions as runtime dependencies.
  • Last commit was recent (2025-04-23), though the package shows aging maintenance status with 478 days since the last release.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 is permissive; you can use this package freely in commercial and private projects with minimal restrictions.

last release 2025-04-23 (478 days) · last repo commit 2025-04-23 · 22 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,054,560 downloads/mo, #4,435 on PyPI

Verify before relying

pip install sortedcontainers-stubs

import sortedcontainers
sd: sortedcontainers.SortedDict = sortedcontainers.SortedDict()
  • Whether type stub coverage is complete for all sortedcontainers 2.4.x APIs and edge cases.
  • Whether the stubs correctly distinguish between stub-only types (SortedKeyDict, SortedKeySet) and runtime types (SortedKeyList) in all type-checking scenarios.
Same gist for agents: .md · .json

What it is and what it does

sortedcontainers-stubs is a type stub package that teaches type checkers like mypy about the sortedcontainers library's API. The sortedcontainers library provides ordered dict, set, and list data structures that maintain elements sorted by value rather than insertion order, and these types have different requirements and methods than Python's built-in equivalents. Without type stubs, type checkers cannot validate that you're using these types correctly.

The package is maintained separately from sortedcontainers itself because the main library's author chose not to include type annotations in the core codebase. The stubs handle the library's API quirks, including the distinction between regular and key-function variants of SortedDict and SortedSet (which are stub-only types) and SortedKeyList (which exists at runtime). Version numbers track sortedcontainers releases: version 2.4.3 of the stubs supports sortedcontainers 2.x.

Use it for

  • Enable mypy or other type checkers to catch incorrect usage of SortedDict, SortedSet, or SortedList in your codebase.
  • Get IDE autocomplete and type hints for sortedcontainers methods and their return types.
  • Validate that keys or values passed to sorted containers meet their comparability or hashability requirements at type-check time.
  • Distinguish between SortedDict and SortedKeyDict in type annotations to document whether a key function is used.
  • Maintain type safety in projects that rely on sortedcontainers for performance-critical sorted data structures.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you use sortedcontainers and run mypy or another type checker.

The package is low-friction to install, has no known vulnerabilities, and is actively maintained. The aging status reflects infrequent releases rather than abandonment—the repo is not archived and received a commit in April 2025. Install it alongside sortedcontainers to get full type coverage.

Install

sortedcontainers-stubs on PyPI

Before you install

Low friction install as a pure stub package with only sortedcontainers and typing-extensions as runtime dependencies. Last commit was recent (2025-04-23), though the package shows aging maintenance status with 478 days since the last release.

Requires Python 3.9 or later; sortedcontainers must also be installed as a runtime dependency.

License in practice

Apache-2.0 is permissive; you can use this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install sortedcontainers-stubs

import sortedcontainers
sd: sortedcontainers.SortedDict = sortedcontainers.SortedDict()

Verify before relying

  • Whether type stub coverage is complete for all sortedcontainers 2.4.x APIs and edge cases.
  • Whether the stubs correctly distinguish between stub-only types (SortedKeyDict, SortedKeySet) and runtime types (SortedKeyList) in all type-checking scenarios.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release <4.0,>=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
sortedcontainerstyping-extensions
MaintenanceAging 478 days since the last release
Last repo commit
First released
Downloads1,054,560 / month, #4,435 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Typing :: Stubs Only

Evidence: sortedcontainers_stubs-2.4.3-py3-none-any.whl

Tags

Capabilities
type stubs sortedcontainersmypy sortedcontainers typessorteddict type checkingsortedset type hintssortedlist type stubspython type stubssortedcontainers typing
Topics
type-stubstype-checking

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 › “type stubs sortedcontainers”

  • sortedcontainers-stubsProvides type stubs for the sortedcontainers library, enabling type…
  • sortedcontainersProvides sorted list, dict, and set data structures implemented in…
  • types-assertpyProvides type stubs enabling static type checkers like mypy and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

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.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

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.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

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.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

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.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

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.

permissive licensepure Python
323.3Mdownloads / mo

See also diskcache-stubs · sortedcontainers · types-mock · sortedcollections · types-cffi · grpc-stubs · types-Werkzeug · pandas-stubs · types-dataclasses · django-types