Track Awesome Python Typing Updates Weekly
Collection of awesome Python types, stubs, plugins, and tools to work with them.
🏠 Home · 🔍 Search · 🔥 Feed · 📮 Subscribe · ❤️ Sponsor · 😺 typeddjango/awesome-python-typing · ⭐ 1.7K · 🏷️ Programming Languages
Sep 09 - Sep 15, 2024
Stub packages
- scipy-stubs (⭐2) - Stubs for SciPy (⭐13k).
Jul 08 - Jul 14, 2024
Backports and improvements
- typing-extensions (⭐422) - Backported and experimental type hints.
Jul 01 - Jul 07, 2024
Tools / Linters
- Ruff (⭐31k) - Extremely fast linter which supports lint rules from many other lint tools, such as flake8.
Apr 08 - Apr 14, 2024
Tools / Helper tools to add annotations to existing code
- no_implicit_optional (⭐78) - A codemod to make your implicit optional type hints PEP 484 compliant.
Apr 01 - Apr 07, 2024
Additional types
- optype (⭐11) - Opinionated
collections.abc
andoperators
alternative: Flexible single-method protocols and typed operators with predictable names.
Mar 04 - Mar 10, 2024
Static type checkers
- basedpyright (⭐944) - Pyright fork with improvements to VSCode support and various other fixes.
Nov 13 - Nov 19, 2023
Stub packages
- python-phonenumbers-stubs (⭐2) - Stubs for phonenumbers (⭐3.5k).
Additional types
- useful-types (⭐88) - Collection of useful protocols and type aliases.
Jul 03 - Jul 09, 2023
Static type checkers
- basedmypy (⭐134) - Based static typing with baseline functionality.
May 29 - Jun 04, 2023
Static type checkers
- pylyzer (⭐2.4k) - A fast static code analyzer & language server for Python, written in Rust.
Feb 06 - Feb 12, 2023
Tools / Helper tools to add annotations to existing code
- jsonschema-gentypes (⭐38) - Generate Python types based on TypedDict from a JSON Schema.
Articles / Third-party articles
- Our journey to type checking 4 million lines of Python - Dropbox has been one of the first companies to adopt Python static type checking at this scale.
Dec 05 - Dec 11, 2022
Articles / Third-party articles
- Python Type Checking (Guide) - In this guide, you will get a look into Python type checking.
Oct 03 - Oct 09, 2022
Tools / Helper tools to add annotations to existing code
- PyTypes (⭐11) - Infer Types by Python Tracing.
Aug 29 - Sep 04, 2022
Backports and improvements
- future-typing (⭐19) - Backport for type hinting generics in standard collections and union types as
X | Y
.
Tools / Working with types
- mypy-baseline (⭐51) - Integrate mypy with existing codebase. A CLI tool that filters out existing type errors and reports only new ones.
- retype (⭐141) - Another tool to apply stubs to code.
- typesplainer (⭐82) - A Python type explainer.
Tools / Helper tools to add annotations to existing code
- infer-types (⭐80) - CLI tool to automatically infer and add type annotations into Python code.
Feb 28 - Mar 06, 2022
Tools / Helper tools to add annotations to existing code
- autotyping (⭐223) - Automatically add simple return type annotations for functions (bool, None, Optional).
Feb 07 - Feb 13, 2022
Stub packages
- boto3-stubs - Stubs for boto3 (⭐9k).
- types-aiobotocore - Stubs for aiobotocore (⭐1.2k).
Jan 24 - Jan 30, 2022
Dynamic type checkers
- typedpy (⭐16) - Type-safe, strict Python. Works well with standard Python.
Stub packages
- celery-types (⭐79) - Type stubs for Celery (⭐24k) and its related packages django-celery-results (⭐679), ampq (⭐308), kombu (⭐2.9k), billiard (⭐410), vine (⭐122) and ephem (⭐766).
Articles / Third-party articles
- Static Typing Python Decorators - Accurately static typing decorators in Python is an icky business. The wrapper function obfuscates type information required to statically determine the types of the parameters and the return values of the wrapped function.
Jan 17 - Jan 23, 2022
Tools / Testing
- mypy-test (⭐5) - Test mypy plugins, stubs, custom types.
Tools / Working with types
- typeforce (⭐19) - CLI tool that enriches your Python environment with type annotations, empowering mypy.
Jan 10 - Jan 16, 2022
Dynamic type checkers
- trycast (⭐76) - Parse JSON-like values whose shape is defined by typed dictionaries (TypedDicts) and other standard Python type hints.
Tools / Linters
- flake8-type-ignore - flake8 plugin to disallow type: ignore comments in your typed Python code.
Tools / Helper tools to add annotations to existing code
- auto-optional (⭐16) - Makes typed arguments Optional when the default argument is
None
.
Articles / Third-party articles
- Python-typing-koans (⭐119) - A set of examples to learn optional static typing in Python.
- Adding type hints to urllib3 - Tests are not enough: Case study adding type hints to urllib3.
- Adam Johnsons Blog - Adam Johnson blogs about typing practices.
- ParamSpec Guide - Newly released feature in
PEP612
allows you do a lot of advanced typing things with functions and their signatures.
Nov 29 - Dec 05, 2021
Tools / Linters
- flake8-type-checking (⭐112) - Plugin to help you guard any type-annotation-only import correctly.
Sep 27 - Oct 03, 2021
Articles / Third-party articles
- PyTest MonkeyType Introduction - Type Annotate an existing Python Django Codebase with MonkeyType.
- Type Check Your Django Application - An article based on two recent talks on adding type checks to Django.
Aug 30 - Sep 05, 2021
Tools / Mypy plugins
- kubernetes-typed (⭐19) - Plugin for kubernetes CRD type checking.
Jul 19 - Jul 25, 2021
Stub packages
- sqlalchemy2-stubs - Official stubs and mypy plugin for SQLAlchemy.
Tools / Mypy plugins
Integrations / Mypy plugins
- nbQA (⭐1k) - Run type checkers (e.g. Mypy) on Jupyter Notebooks.
Jul 12 - Jul 18, 2021
Static type checkers
- mypy (⭐18k) - Optional static typing (PEP 484).
- pyanalyze (⭐333) - Extensible static analyzer and type checker.
- pycharm - IDE for Professional Developers.
- pyre - Performant type-checker.
- pytype (⭐4.7k) - Tool to check and infer types - without requiring type annotations.
Dynamic type checkers
- pytypes (⭐200) - Provides a rich set of utilities for runtime typechecking.
- strongtyping (⭐107) - Decorator which checks whether the function is called with the correct type of parameters.
Stub packages
- asgiref (⭐1.5k) - ASGI specification, provides asgiref.typing (⭐1.5k) module with type annotations for ASGI servers.
- botostubs (⭐95) - Gives you code assistance for any boto3 API in any IDE.
- PyQt5-stubs (⭐67) - Stubs for PyQt5.
- sqlalchemy-stubs (⭐570) - Stubs for SQLAlchemy (⭐9.4k).
- typeshed (⭐4.3k) - Collection of library stubs, with static types.
Additional types
- meiga (⭐76) - Simple, typed and monad-based Result type.
- option (⭐83) - Rust like Option and Result types.
- phantom-types (⭐194) - Phantom types.
- returns (⭐3.5k) - Make your functions return something meaningful, typed, and safe.
- safetywrap (⭐43) - Fully typesafe, Rust-like Result and Option types.
- typet (⭐21) - Length-bounded types, dynamic object validation.
Backports and improvements
- typing-utils (⭐12) - Backport 3.8+ runtime typing utils(for eg: get_origin) & add issubtype & more.
Tools / Linters
- flake8-pyi (⭐73) - Plugin for Flake8 that provides specializations for type hinting stub files.
- wemake-python-styleguide (⭐2.5k) - The strictest and most opinionated Python linter ever.
Tools / Testing
- pytest-mypy (⭐246) - Mypy static type checker plugin for Pytest.
Tools / Working with types
- com2ann (⭐140) - Tool for translation of type comments to type annotations.
- merge-pyi (⭐4.7k) - Part of pytype toolchain, applies stub files onto source code.
- mypy-silent (⭐14) - Silence mypy by adding or removing code comments.
- typing-inspect (⭐347) - The typing_inspect module defines experimental API for runtime inspection of types defined in the
typing
module.
Tools / Helper tools to add annotations to existing code
- monkeytype (⭐4.7k) - Collects runtime types of function arguments and return values, and can automatically generate stub files or even add draft type annotations directly to your code based on the types collected at runtime.
- pytest-annotate (⭐109) - Pyannotate plugin for pytest.
- pytest-monkeytype (⭐43) - MonkeyType plugin for pytest.
- type4py (⭐61) - Deep Similarity Learning-Based Type Inference.
- typilus (⭐58) - A deep learning algorithm for predicting types in Python. Also available as a GitHub action (⭐41)
Tools / Mypy plugins
- loguru-mypy (⭐19) - Plugin for loguru (⭐19k) support.
- pynamodb-mypy (⭐4) - Plugin for PynamoDB (⭐2.4k) support.
Integrations / Mypy plugins
- emacs-flycheck-mypy (⭐38) - Mypy integration for Emacs.
- mypy-playground (⭐69) - Online playground for mypy.
- mypy-pycharm-plugin (⭐313) - Mypy integration for PyCharm.
- pylance (⭐1.7k) - PyRight integration for VSCode.
Articles / Third-party articles
- Type hints cheat sheet - Cheat sheet on writing type annotations by MyPy team.
- Typechecking Django and DRF - Full tutorial about type-checking django.
- typing - Official Python documentation for
typing
module.
Communities / Third-party articles
- TypedDjango - Official organisation gitter chat.
Jun 28 - Jul 04, 2021
Stub packages
- torchtyping (⭐1.4k) - Enhanced type annotations for pytorch.
May 24 - May 30, 2021
Articles / Third-party articles
- The state of type hints in Python - As of May 2018.
Mar 22 - Mar 28, 2021
Stub packages
- lxml-stubs (⭐42) - Stubs for lxml.
Mar 08 - Mar 14, 2021
Tools / Linters
- flake8-typing-imports (⭐48) - Plugin which checks that typing imports are properly guarded.
- flake8-typing-only-imports (⭐112) - flake8 plugin that helps identify which imports to put into type-checking blocks, and how to adjust your type annotations once imports are moved.
Mar 01 - Mar 07, 2021
Dynamic type checkers
- beartype (⭐2.6k) - Unbearably fast
O(1)
runtime type-checking in pure Python.
Tools / Helper tools to add annotations to existing code
- pyannotate (⭐1.4k) - Insert annotations into your source code based on call arguments and return types observed at runtime.
- pyre infer (⭐6.8k) - Pyre has a powerful feature for migrating codebases to a typed format. The infer command-line option ingests a file or directory, makes educated guesses about the types used, and applies the annotations to the files.
- pytype annotate-ast (⭐4.7k) - A work-in-progress tool to annotate the nodes of an AST with their Python types.
Oct 05 - Oct 11, 2020
Tools / Working with types
- typing-json - Lib for working with typed objects and JSON.
Sep 21 - Sep 27, 2020
Tools / Linters
- flake8-annotations (⭐156) - Plugin for flake8 to check for presence of type annotations in function definitions.
Jun 08 - Jun 14, 2020
Tools / Testing
- pytest-mypy-testing (⭐28) - Pytest plugin to test mypy static type analysis.
May 25 - May 31, 2020
Articles / PEPs
- PEP-3107 - Function Annotations.
- PEP-482 - Literature Overview for Type Hints.
- PEP-483 - The Theory of Type Hints.
- PEP-484 - Type Hints.
- PEP-526 - Syntax for Variable Annotations.
- PEP-544 - Protocols: Structural subtyping (static duck typing).
- PEP-557 - Data Classes.
- PEP-560 - Core support for typing module and generic types.
- PEP-561 - Distributing and Packaging Type Information.
- PEP-563 - Postponed Evaluation of Annotations.
- PEP-585 - Type Hinting Generics In Standard Collections.
- PEP-586 - Literal Types.
- PEP-589 - TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys.
- PEP-591 - Adding a final qualifier to typing.
- PEP-593 - Flexible function and variable annotations.
- PEP-604 - Complementary syntax for Union[].
- PEP-612 - Parameter Specification Variables.
- PEP-613 - Explicit Type Aliases.
Dec 23 - Dec 29, 2019
Dynamic type checkers
- typical (⭐182) - Data parsing and automatic type-coercion using type hinting. Supports dataclasses, standard classes, function signatures, and more.
Oct 14 - Oct 20, 2019
Dynamic type checkers
- pydantic (⭐20k) - Data parsing using Python type hinting. Supports dataclasses.
- typeguard (⭐1.5k) - Another one runtime type checker.
Oct 07 - Oct 13, 2019
Stub packages
- pythonista-stubs (⭐13) - Stubs for Pythonista.
Tools / Working with types
- mypyc (⭐18k) - Compiles mypy-annotated, statically typed Python modules into CPython C extensions.
Sep 30 - Oct 06, 2019
Articles / Third-party articles
- 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.
Sep 23 - Sep 29, 2019
Static type checkers
- pyright (⭐13k) - 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.
Stub packages
- django-stubs (⭐1.6k) - Stubs for Django (⭐79k).
- djangorestframework-stubs (⭐431) - Stubs for DRF (⭐28k).
- grpc-stubs (⭐35) - Stubs for grpc (⭐42k).
Tools / Linters
- flake8-annotations-complexity (⭐46) - Plugin for flake8 to validate annotations complexity.
Tools / Testing
- pytest-mypy-plugins (⭐99) - Pytest plugin for testing mypy types, stubs, and plugins.
Tools / Working with types
- mypy-protobuf (⭐643) - Tool to generate mypy stubs from protobufs.
Tools / Mypy plugins
- mypy-zope (⭐38) - Plugin for zope.interface support.
- mypy/plugins (⭐18k) - Plugins already integrated into mypy.
Integrations / Mypy plugins
- vim-mypy (⭐97) - Mypy integration for Vim.
Articles / Third-party articles
- Testing mypy stubs, plugins, and types - Full tutorial about testing mypy types.
Communities / Third-party articles
- python/typing - Official typing gitter chat.
- PythonRu#typing - Russian slack chat (invites are here) about types.
Related / Third-party articles
- awesome-python (⭐219k) - Curated list of awesome Python frameworks, libraries, software and resources.
- python-typecheckers (⭐61) - List of Python type checkers: static and runtime.