types-Flask
Typing stubs for Flask
What it is and what it does
types-Flask is a PEP 561 type stub package that provides type information for the Flask web framework. It allows static type checkers like mypy and PyCharm to understand Flask's API and catch type errors in code that uses Flask. The package is sourced from the typeshed project and depends on three related type stub packages: types-Jinja2, types-Werkzeug, and types-click.
However, this package is largely superseded: Flask has included native type annotations since version 2.0, making types-Flask redundant for modern Flask installations. The package is maintained through typeshed but should only be installed if you are using Flask 1.x or need stubs for an older Flask version.
Use it for:
- Type-checking Flask 1.x applications with mypy or similar tools when native stubs are unavailable.
- Enabling IDE autocomplete and type hints in editors like PyCharm for Flask 1.x projects.
- Validating Flask route handlers and request/response types in legacy codebases before upgrading.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides PEP 561 type stubs for Flask to enable static type checking with mypy, PyCharm, pytype, and similar tools.
No for most users. If you are using Flask 2.0 or later, Flask includes native type annotations and you should not install this package. Only install types-Flask if you are maintaining Flask 1.x code and need type-checking support; otherwise, upgrade Flask and rely on its built-in stubs.
Install
types-flask on PyPI
pip
pip install types-flaskuv
uv add types-flaskpoetry
poetry add types-flaskInstalling types-Flask
Before you install
Low install friction with three lightweight type-stub runtime dependencies. Maintenance is active with regular updates from the typeshed repository, though the latest release is from 2021-11-26.
License in practice
Licensed under Apache-2.0, a permissive open-source license that allows free use, modification, and distribution with minimal restrictions.
Quickstart
pip install types-Flask
import flask
app = flask.Flask(__name__)
Flask 2.0 and later include native type annotations; installing types-Flask alongside Flask 2.0+ is redundant and should be avoided.
Verify before relying
- Whether this package is still actively maintained given the latest release date of 2021-11-26 and the note that Flask 2.0+ includes native stubs.
- Coverage and accuracy of type stubs relative to current Flask versions.
Package facts
| License | Apache-2.0 license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — types-Jinja2, types-Werkzeug, types-click |
| Maintenance | actively maintained — 1,722 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,432,193/month — #3,910 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_Flask-1.1.6-py3-none-any.whl
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
types-certifiProvides type stubs for the certifi package to…
permissive · top 1,000 on PyPI
types-filelockProvides type stubs for the filelock package to…
permissive · top 15,000 on PyPI
types-Jinja2Provides PEP 561 type stubs for Jinja2,…
permissive · top 5,000 on PyPI
types-WerkzeugProvides PEP 561 type stubs for Werkzeug,…
permissive · top 5,000 on PyPI
trio-typingProvides PEP 561 type stubs and typing…
permissive · top 5,000 on PyPI
types-Flask-SQLAlchemyProvides type stubs for Flask-SQLAlchemy to…
permissive · top 15,000 on PyPI
types-pkg-resourcesProvides type stubs for pkg_resources to enable…
permissive · top 15,000 on PyPI
types-MarkupSafeProvides type stubs for MarkupSafe, enabling…
permissive · top 5,000 on PyPI
types-geoip2Provides type stubs for the geoip2 package,…
permissive · top 15,000 on PyPI
pymupdf-stubsProvides type stubs for PyMuPDF to enable…
permissive · top 15,000 on PyPI