hello-anmol / awesome-python-typing

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

Home Page:https://github.com/typeddjango

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Awesome Python Typing Awesome Gitter

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

Contents

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.

Dynamic type checkers

  • enforce - Runtime type checking for integration testing and data validation.
  • magic-constraints - Type introspection and runtime parameter type/value checking.
  • pydantic - Data parsing using Python type hinting. Supports dataclasses.
  • typeguard - Another one runtime type checker.

Stub packages

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

Mypy plugins

Integrations

Articles

PEPs

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

Tools' docs

  • MyPy docs - General information about stubs.

Third-party articles

Communities

Related

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

License

CC BY-SA 4.0

About

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

https://github.com/typeddjango

License:Creative Commons Attribution Share Alike 4.0 International