skillfed

types-Flask

Typing stubs for Flask

types-flask v1.1.6 1.4M downloads/30d#3,910 on PyPI5,108
Permissive license Apache-2.0 license Active released

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-flask

uv

uv add types-flask

poetry

poetry add types-flask

Installing 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

License :: OSI Approved :: Apache Software LicenseTyping :: Typed

Tags

flask type stubsflask type checkingmypy flask typesflask type hintspep 561 stubsflask static typing
type-stubsstatic-typing

More Quality Assurance packages