Collection of awesome Python types, stubs, plugins, and tools to work with them.
- Static type checkers
- Dynamic type checkers
- Stub packages
- Backports and improvements
- Tools
- Integrations
- Articles
- Communities
- Related
- mypy - Optional static typing for Python 3 and 2 (PEP 484).
- pyre - Performant type-checker for Python 3.
- pytype - Tool to check and infer types for Python code - without requiring type annotations.
- PyCharm - IDE for Professional Developers.
- 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.
- pytypes - Provides a rich set of utilities for runtime typechecking.
- pydantic - Data parsing using Python type hinting. Supports dataclasses.
- typeguard - Another one runtime type checker.
- Typeshed - Collection of library stubs for Python, with static types.
- django-stubs - Stubs for Django.
- djangorestframework-stubs - Stubs for DRF.
- numpy-stubs - Stubs for NumPy.
- dry-python/returns - Stubs for returns.
- sqlalchemy-stubs - Stubs for SQLAlchemy.
- grpc-stubs - Stubs for grpc.
- PyQt5-stubs - Stubs for PyQt5.
- ordered-set-stubs - Stubs for OrderedSet.
- pyspark-stubs - Stubs for PySpark.
- pythonista-stubs - Stubs for Pythonista.
- typed-ast - Modified fork of CPython's ast module that parses
# type:
comments. - typing-extensions - Backported and experimental type hints.
- typingplus - Backport support, dynamic is_instance and cast for abstract types.
- typet - Length-bounded types, dynamic object validation.
- wemake-python-styleguide - The strictest and most opinionated python linter ever.
- flake8-mypy - Plugin for flake8 integrating mypy.
- flake8-pyi - Plugin for Flake8 that provides specializations for type hinting stub files.
- 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.
- pytest-mypy - Mypy static type checker plugin for Pytest.
- pytest-mypy-plugins - Pytest plugin for testing mypy types, stubs, and plugins.
- MonkeyType - Collects runtime types of function arguments and return values, and can automatically generate stub files or even add draft type annotations directly to your Python code based on the types collected at runtime.
- merge_pyi - Part of pytype toolchain, applies stub files onto source code.
- retype - Another tool to apply stubs to code.
- mypy-protobuf - Tool to generate mypy stubs from protobufs.
- mypyc - Compiles mypy-annotated, statically typed Python modules into CPython C extensions.
- typing_inspect - The typing_inspect module defines experimental API for runtime inspection of types defined in the Python standard typing module.
- typing-json - Lib for working with typed objects and JSON.
- pynamodb-mypy - Plugin for PynamoDB support.
- mypy-zope - Plugin for zope.interface support.
- mypy/plugins - Plugins already integrated into mypy.
- mypy-PyCharm-plugin - Mypy integration for PyCharm.
- vim-mypy - Mypy integration for Vim.
- linter-mypy - Mypy integration for Atom.
- emacs-flycheck-mypy - Mypy integration for Emacs.
- PEP-483 - About type hints theory.
- PEP-484 - About type annotations.
- PEP-544 - About protocols.
- PEP-561 - About distributing and packaging type information.
- PEP-563 - About postponed evaluation of annotations.
- PEP-586 - About literal types.
- PEP-3107 - About function annotations.
- typing - Support for type hints.
- MyPy docs - General information about stubs.
- 1-minute guide to real constants in Python - Full tutorial about
Final
constants and inheritance. - Simple dependent types in Python - Full tutorial about
Literal
types. - Typechecking Django and DRF - Full tutorial about type-checking django.
- Testing mypy stubs, plugins, and types - Full tutorial about testing mypy types.
- The state of type hints in Python - As of May 2018.
- python/typing - Official typing gitter chat.
- TypedDjango - Official organisation gitter chat.
- PythonRu#typing - Russian slack chat (invites are here) about types.
- awesome-python - Curated list of awesome Python frameworks, libraries, software and resources.
- python-typecheckers - List of Python type checkers: static and runtime.