Collection of awesome Python types, stubs, plugins, and tools to work with them.
- Static type checkers
- Dynamic type checkers
- Stub packages
- Additional types
- Backports and improvements
- Tools
- Integrations
- Articles
- Communities
- Related
Full list of typed projects on PyPi is here.
- basedmypy - Based static typing with baseline functionality.
- basedpyright - Pyright fork with improvements to VSCode support and various other fixes.
- mypy - Optional static typing (PEP 484).
- pyanalyze - Extensible static analyzer and type checker.
- pycharm - IDE for Professional Developers.
- pylyzer - A fast static code analyzer & language server for Python, written in Rust.
- pyre - Performant type-checker.
- pyright - Fast type checker meant for large Python source bases. It can run in a “watch” mode and performs fast incremental updates when files are modified.
- pytype - Tool to check and infer types - without requiring type annotations.
- beartype - Unbearably fast
O(1)
runtime type-checking in pure Python. - pydantic - Data parsing using Python type hinting. Supports dataclasses.
- pytypes - Provides a rich set of utilities for runtime typechecking.
- strongtyping - Decorator which checks whether the function is called with the correct type of parameters.
- typedpy - Type-safe, strict Python. Works well with standard Python.
- typeguard - Another one runtime type checker.
- typical - Data parsing and automatic type-coercion using type hinting. Supports dataclasses, standard classes, function signatures, and more.
- trycast - Parse JSON-like values whose shape is defined by typed dictionaries (TypedDicts) and other standard Python type hints.
- asgiref - ASGI specification, provides asgiref.typing module with type annotations for ASGI servers.
- boto3-stubs - Stubs for boto3.
- botostubs - Gives you code assistance for any boto3 API in any IDE.
- celery-types - Type stubs for Celery and its related packages django-celery-results, ampq, kombu, billiard, vine and ephem.
- django-stubs - Stubs for Django.
- djangorestframework-stubs - Stubs for DRF.
- grpc-stubs - Stubs for grpc.
- lxml-stubs - Stubs for lxml.
- PyQt5-stubs - Stubs for PyQt5.
- python-phonenumbers-stubs - Stubs for phonenumbers.
- pythonista-stubs - Stubs for Pythonista.
- scipy-stubs - Stubs for SciPy.
- sqlalchemy-stubs - Stubs for SQLAlchemy.
- sqlalchemy2-stubs - Official stubs and mypy plugin for SQLAlchemy.
- torchtyping - Enhanced type annotations for pytorch.
- types-aiobotocore - Stubs for aiobotocore.
- typeshed - Collection of library stubs, with static types.
- meiga - Simple, typed and monad-based Result type.
- option - Rust like Option and Result types.
- optype - Opinionated
collections.abc
andoperators
alternative: Flexible single-method protocols and typed operators with predictable names. - phantom-types - Phantom types.
- returns - Make your functions return something meaningful, typed, and safe.
- safetywrap - Fully typesafe, Rust-like Result and Option types.
- typet - Length-bounded types, dynamic object validation.
- useful-types - Collection of useful protocols and type aliases.
- future-typing - Backport for type hinting generics in standard collections and union types as
X | Y
. - typing-extensions - Backported and experimental type hints.
- typing-utils - Backport 3.8+ runtime typing utils(for eg: get_origin) & add issubtype & more.
- flake8-annotations-complexity - Plugin for flake8 to validate annotations complexity.
- flake8-annotations - Plugin for flake8 to check for presence of type annotations in function definitions.
- flake8-pyi - Plugin for Flake8 that provides specializations for type hinting stub files.
- flake8-type-checking - Plugin to help you guard any type-annotation-only import correctly.
- flake8-typing-imports - Plugin which checks that typing imports are properly guarded.
- flake8-typing-only-imports - flake8 plugin that helps identify which imports to put into type-checking blocks, and how to adjust your type annotations once imports are moved.
- flake8-type-ignore - flake8 plugin to disallow type: ignore comments in your typed Python code.
- wemake-python-styleguide - The strictest and most opinionated Python linter ever.
- Ruff - Extremely fast linter which supports lint rules from many other lint tools, such as flake8.
- mypy-test - Test mypy plugins, stubs, custom types.
- pytest-mypy-plugins - Pytest plugin for testing mypy types, stubs, and plugins.
- pytest-mypy-testing - Pytest plugin to test mypy static type analysis.
- pytest-mypy - Mypy static type checker plugin for Pytest.