What's the best practice to validate parameter types at runtime in Python, with and without a third-party module?

This page summarizes the projects mentioned and recommended in the original post on /r/learnpython

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • beartype

    Unbearably fast near-real-time hybrid runtime-static type-checking in pure Python.

    There is the beartype project.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • mypy

    Optional static typing for Python

    Although I urge you to use type annotations and a static type checker (such as mypy and pyright) over runtime type checks.

  • pyright

    Static Type Checker for Python

    Although I urge you to use type annotations and a static type checker (such as mypy and pyright) over runtime type checks.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • UV - A Ferramenta que Simplifica o Gerenciamento de Ambientes e DependĂȘncias no Python

    2 projects | dev.to | 14 Nov 2024
  • Adding Static Analysis Tools to Maintain the Code Quality

    2 projects | dev.to | 1 Nov 2024
  • Python 3.13.0 Is Released

    11 projects | news.ycombinator.com | 7 Oct 2024
  • Fast Development: Lint

    1 project | dev.to | 29 Sep 2024
  • Duck Typing Meets Type Hints: Using Protocols in Python

    1 project | dev.to | 30 Jul 2024