A collection of external type annotations (stubs) for the Python standard library and third-party packages.
Typeshed is a collection of external type annotations (stub files) for Python's standard library and third-party packages. It provides the type definitions that static type checkers and IDEs use to perform type checking, inference, and autocompletion on Python code, solving the problem of missing or incomplete type hints in libraries.
Python developers using static type checkers (like mypy or pyright) or IDEs with type support, as well as library maintainers who want to provide or consume type annotations for their packages.
Developers choose Typeshed because it offers a centralized, community-driven source of high-quality type stubs that are essential for accurate static analysis, reducing type-related errors and improving developer productivity across the Python ecosystem.
Collection of library stubs for Python, with static types
Provides full type annotations for Python's built-ins and standard library modules, enabling accurate static analysis without manual effort, as bundled with major type checkers.
Includes community-contributed stubs for popular external packages available via PyPI, such as types-requests, allowing type checking across a wide ecosystem.
Designed to work effortlessly with static type checkers like mypy and pyright, improving developer workflow with autocompletion and error detection.
Stub packages follow the versioning of runtime packages, with clear strategies outlined in the README to manage compatibility, though with some risks.
Stubs often lag behind the actual library releases, as admitted in the versioning section, leading to potential inaccuracies in type checking until updates are pushed.
Any version bump can introduce breaking changes that disrupt type checking, requiring careful dependency management and pinning, which adds overhead.
Not all third-party packages have stubs, especially niche or proprietary ones, leaving gaps that developers must manually handle or ignore.
An extremely fast Python linter and code formatter, written in Rust.
The uncompromising Python code formatter
Optional static typing for Python
An extremely fast Python type checker and language server, written in Rust.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.