mypy
Optional static typing for Python
Decision gist · record as of 2026-08-14
Yes. Mypy is production-stable, actively maintained, widely adopted (top 1000 PyPI), has no known vulnerabilities, and low install friction. It's the standard static type checker for Python and essential for teams prioritizing code quality and early error detection. Install it unless your project has no type hints or strict Python version constraints below 3.10.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with a pure-Python wheel distribution.
- Actively maintained with a recent release; the project is production-stable and widely adopted.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-07-13 (32 days) · last repo commit 2026-08-13 · 20,592 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 199,878,532 downloads/mo, #207 on PyPI
Alternatives
Verify before relying
pip install mypy
# In a file with type hints:
def greet(name: str) -> str:
return f"Hello {name}"
greet("world") # mypy validates this
# Run: mypy your_file.py- Whether the compiled mypyc version is included by default in the wheel or requires separate installation.
- Performance characteristics of daemon mode (dmypy) for incremental checking on large codebases.
- Exact speedup factor claimed for the compiled version relative to interpreted execution.
What it is and what it does
Mypy is a static type checker that reads Python type hints (following PEP 484) and validates your code without executing it, catching type mismatches early in development. It supports gradual typing, meaning you can add type hints incrementally to an existing codebase and fall back to dynamic typing where convenient. The checker understands type inference, generics, union types, structural subtyping, and other advanced type features.
You install it via pip, add type hints to your Python code (which don't affect runtime behavior), and run mypy as a command-line tool or daemon to find bugs before they reach production. It integrates with popular IDEs and CI/CD pipelines, and can be used alongside the Python interpreter—your code runs normally even if mypy reports errors.
Use it for
- Catch type mismatches in function arguments and return values during development before running tests.
- Gradually add type safety to a large legacy codebase by annotating modules one at a time.
- Integrate type checking into pre-commit hooks or CI pipelines to enforce type correctness across a team.
- Use daemon mode for fast incremental type checking on large projects.
- Validate third-party library usage by checking that your calls match published type stubs.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Mypy is production-stable, actively maintained, widely adopted (top 1000 PyPI), has no known vulnerabilities, and low install friction. It's the standard static type checker for Python and essential for teams prioritizing code quality and early error detection. Install it unless your project has no type hints or strict Python version constraints below 3.10.
Install
mypy on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release; the project is production-stable and widely adopted.
Requires Python 3.10 or later.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install mypy
# In a file with type hints:
def greet(name: str) -> str:
return f"Hello {name}"
greet("world") # mypy validates this
# Run: mypy your_file.py
Verify before relying
- Whether the compiled mypyc version is included by default in the wheel or requires separate installation.
- Performance characteristics of daemon mode (dmypy) for incremental checking on large codebases.
- Exact speedup factor claimed for the compiled version relative to interpreted execution.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagestyping_extensionsmypy_extensionspathspectomlilibrtast-serialize |
| Maintenance | Actively maintained 32 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 199,878,532 / month, #207 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Topic :: Software DevelopmentTyping :: Typed |
Evidence: mypy-2.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “python type hints validator”
- mypyMypy is a static type checker for Python that validates type hints at…
- typing-validationRuntime validation of Python objects against type hints, with three…
- annotatedyamlParses and validates YAML files with support for embedded secrets and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also DafnyRuntimePython · mypy-extensions · strongtyping · pytest-mypy · mypy-gitlab-code-quality · pylsp-mypy · django-stubs · types-assertpy · lxml-stubs · types-mypy-extensions