← All notes

Flask is a WSGI app object; FastAPI is an API framework with type hints

Answer: A Flask instance is the WSGI application. The route decorator tells Flask what URL should trigger our function. FastAPI builds APIs with standard Python type hints.

Flask

A Flask application starts by creating an instance of the Flask class. An instance of this class is the WSGI application. The first argument names the application's module or package. __name__ works as a shortcut in most cases. The route decorator tells Flask what URL should trigger the view function. The function returns the message to display in the user's browser. The default content type is HTML.

FastAPI

This framework is for building APIs with Python. It is based on standard Python type hints. One of the key features is automatic interactive documentation. It follows OpenAPI, previously known as Swagger, and JSON Schema.

The Quickstart describes that Flask instance as the WSGI application. One of the key features is automatic interactive documentation.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Flask docs, Quickstart, BSD-3-Clause (https://raw.githubusercontent.com/pallets/flask/main/LICENSE.txt). Copyright 2010 Pallets. FastAPI docs, FastAPI, MIT (https://raw.githubusercontent.com/fastapi/fastapi/master/LICENSE). Copyright (c) 2018 Sebastián Ramírez. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Flask docs, Quickstart, BSD-3-Clause (https://raw.githubusercontent.com/pallets/flask/main/LICENSE.txt). Copyright 2010 Pallets. FastAPI docs, FastAPI, MIT (https://raw.githubusercontent.com/fastapi/fastapi/master/LICENSE). Copyright (c) 2018 Sebastián Ramírez.

Cite this

Permanent ID: iil:note:x2vwmbd0

iinventedlight. 2026. "Flask is a WSGI app object; FastAPI is an API framework with type hints." iinventedlight Library, iil:note:x2vwmbd0, version of 2026-11-16. https://iinventedlight.com/library/notes/flask-and-fastapi/. License: CC-BY-4.0.

@misc{iil_note_x2vwmbd0,
  author = {{iinventedlight}},
  title = {{Flask is a WSGI app object; FastAPI is an API framework with type hints}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-16},
  url = {https://iinventedlight.com/library/notes/flask-and-fastapi/},
  note = {Permanent ID iil:note:x2vwmbd0. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/flask-and-fastapi.md.