mypy
Optional static typing for Python
Install
mypy on PyPI
pip
pip install mypyuv
uv add mypypoetry
poetry add mypyPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — typing_extensions, mypy_extensions, pathspec, tomli, librt, ast-serialize |
| Maintenance | actively maintained — 31 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: mypy-2.3.0-py3-none-any.whl
About mypy
from the package's own PyPI description — quoted content, verbatim
<img src="docs/source/mypy_light.svg" alt="mypy logo" width="300px"/>
Mypy: Static Typing for Python
Stable Version (image) Downloads (image) Build Status (image) Documentation Status (image) Chat at https://gitter.im/python/typing (image) Checked with mypy (image) Code style: black (image) Linting: Ruff (image)
Got a...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Mypy is a static type checker for Python that detects type errors before runtime by analyzing type hints in your code, helping catch bugs without executing the program.
Low install friction with a pure-wheel distribution and six runtime dependencies. Actively maintained with a release 31 days ago and 20592 repository stars; last commit on 2026-08-13 confirms ongoing development.
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Usage
pip install mypy
# Create a typed Python file
echo 'def greet(name: str) -> str:
return "Hello " + name' > example.py
# Run type checker
mypy example.py
Requires Python 3.10 or later (supports 3.10–3.15); mypy is distributed as a compiled binary by default but --no-binary flag installs interpreted version if needed.
Verdict: Mypy is a mature, actively maintained static type checker (MIT licensed, no known vulnerabilities) with low install friction and broad Python version support. It is a top-1000 PyPI package suitable for development workflows seeking gradual typing adoption and early bug detection.
Needs verification
- Whether the compiled mypyc binary is available for all supported Python versions and platforms.
- Performance characteristics and memory overhead for large codebases relative to project scale.
- Specific performance improvement factor from mypyc compilation mentioned in documentation.
Similar packages
unclear · top 1,000 on PyPI
typing-extensionspermissive · top 100 on PyPI
pyflakespermissive · top 1,000 on PyPI
cfn-lintpermissive · top 1,000 on PyPI
backports.tarfilepermissive · top 1,000 on PyPI
mypy-boto3-s3permissive · top 1,000 on PyPI
librtpermissive · top 1,000 on PyPI
py-spypermissive · top 1,000 on PyPI
boto3-stubspermissive · top 1,000 on PyPI
types-certifipermissive · top 1,000 on PyPI