types-toposort
Typing stubs for toposort
What it is and what it does
types-toposort is a type stub package that provides type annotations for the toposort library. It allows static type checkers like mypy and pyright to understand and validate the types of toposort's functions and classes when you use them in your code. This is useful when toposort itself does not ship with inline type hints.
The package is maintained as part of the typeshed project, which is the canonical repository of type stubs for the Python ecosystem. It targets toposort version 1.10 and has been tested with mypy 1.20.0 and pyright 1.1.408. Since it contains only type information and no runtime code, it has zero runtime dependencies and installs quickly.
Use it for:
- Enable type checking in projects that use toposort for dependency resolution or task scheduling
- Catch type errors in topological sort operations before runtime in CI/CD pipelines
- Provide IDE autocompletion and type hints when writing code that calls toposort functions
- Satisfy strict type checking policies that require all dependencies to have type coverage
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type hints for the toposort package, enabling type checkers like mypy and pyright to validate code that uses topological sorting.
Yes, if you use toposort in a type-checked project. Install it alongside toposort to enable full static type checking. It has no runtime cost, low install friction, and is actively maintained. If you don't use type checking or toposort is already fully typed, it is not necessary.
Install
types-toposort on PyPI
pip
pip install types-toposortuv
uv add types-toposortpoetry
poetry add types-toposortInstalling types-toposort
Before you install
Low friction install with no runtime dependencies. Actively maintained as part of the typeshed project, with recent releases and current status.
License in practice
Licensed under Apache-2.0, a permissive license that allows free use, modification, and distribution with minimal restrictions.
Quickstart
pip install types-toposort
Then use with your type checker configuration (mypy or pyright) to validate toposort usage in your code.
Requires Python 3.10 or later.
Verify before relying
- Whether this package is required or optional when using toposort in a type-checked project
- Whether toposort itself is already typed or if these stubs are necessary for full coverage
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 128 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 310,619/month — #7,743 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_toposort-1.10.0.20260408-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-tabulateProvides type hints for the tabulate package,…
permissive · top 5,000 on PyPI
types-chevronProvides type hints for the chevron Mustache…
permissive · top 15,000 on PyPI
types-retryProvides type hints for the retry package,…
permissive · top 5,000 on PyPI
toposortImplements topological sorting of directed…
permissive · top 5,000 on PyPI
types-grpcio-reflectionProvides type hints for grpcio-reflection,…
permissive · top 15,000 on PyPI
types-tomlProvides type hints for the toml package,…
permissive · top 1,000 on PyPI
types-Flask-MigrateProvides type hints for Flask-Migrate, enabling…
permissive · top 15,000 on PyPI
types-jsonschemaProvides type hints for the jsonschema package,…
permissive · top 5,000 on PyPI
types-coloramaProvides type stubs for colorama, enabling…
permissive · top 5,000 on PyPI
types-pyperclipProvides type annotations for the pyperclip…
permissive · top 15,000 on PyPI