Need help with awesome-python-typing?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

typeddjango
589 Stars 30 Forks Creative Commons Attribution Share Alike 4.0 International 63 Commits 2 Opened issues

Description

Collection of awesome Python types, stubs, plugins, and tools to work with them.

Services available

!
?

Need anything else?

Contributors list

Awesome Python Typing Awesome Gitter

Collection of awesome Python types, stubs, plugins, and tools to work with them.

Contents

Full list of typed projects on PyPi is here.

Static type checkers

  • 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.
  • pyanalyze - Extensible static analyzer and type checker for Python.

Dynamic type checkers

  • 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.
  • typical - Data parsing and automatic type-coercion using type hinting. Supports dataclasses, standard classes, function signatures, and more.

Stub packages

Backports and improvements

  • 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.

Tools

Linters

Testing

Working with types

  • 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.
  • pyannotate - Insert annotations into your source code based on call arguments and return types observed at runtime.
  • pytest-annotate - Pyannotate plugin for pytest.
  • 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.

Mypy plugins

Integrations

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.

Python docs

  • typing - Support for type hints.

Tools' docs

  • MyPy docs - General information about stubs.

Third-party articles

Communities

  • python/typing - Official typing gitter chat. <!--lint disable awesome-list-item-->
  • TypedDjango - Official organisation gitter chat. <!--lint enable awesome-list-item-->
  • PythonRu#typing - Russian slack chat (invites are here) about types.

Related

  • awesome-python - Curated list of awesome Python frameworks, libraries, software and resources.
  • python-typecheckers - List of Python type checkers: static and runtime.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.