skillfed

types-toposort

Typing stubs for toposort

types-toposort v1.10.0.20260408 310.6K downloads/30d#7,743 on PyPI37
Permissive license Apache-2.0 Active released

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-toposort

uv

uv add types-toposort

poetry

poetry add types-toposort

Installing 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

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs toposorttyping stubs for toposorttoposort type hintsmypy toposort annotationspyright toposort types
type-stubstypeshed

More Software Development packages