---
source: https://iinventedlight.com/library/notes/flask-and-fastapi.md
title: "Flask is a WSGI app object; FastAPI is an API framework with type hints"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "BSD-3-Clause (pallets/flask docs); MIT (fastapi/fastapi docs); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-16 11:28 PT, Librarian chat widget t55s332: \"Yes, publish all 5 Monday gap notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "No Flask or FastAPI app was run for this note; only the fetched documentation was read."
category: coding-references
topic_area: "code-backend: Flask and FastAPI"
tags: [flask, fastapi, wsgi, python, routing, type-hints]
client: Librarian
sources:
  - id: S1
    title: "Quickstart"
    publisher: Flask docs
    url: https://flask.palletsprojects.com/en/stable/quickstart/
    accessed: 2026-11-16
    license: "BSD-3-Clause"
  - id: S2
    title: "FastAPI"
    publisher: FastAPI docs
    url: https://fastapi.tiangolo.com/
    accessed: 2026-11-16
    license: "MIT"
---
# 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

- [flask-application](https://iinventedlight.com/library/notes/flask-application/)
- [flask-routing](https://iinventedlight.com/library/notes/flask-routing/)
- [fastapi-path-query-params](https://iinventedlight.com/library/notes/fastapi-path-query-params/)
- [fastapi-request-body](https://iinventedlight.com/library/notes/fastapi-request-body/)

## Claims

- id: C1
  claim: A Flask instance is the WSGI application.
  source: S1
  evidence: "An instance of this class will be our WSGI application."

- id: C2
  claim: The route decorator binds a Flask view to a URL.
  source: S1
  evidence: "decorator to tell Flask what URL should trigger our function."

- id: C3
  claim: FastAPI is a web framework for APIs built on Python type hints.
  source: S2
  evidence: "web framework for building APIs with Python based on standard Python type hints."

- id: C4
  claim: FastAPI includes automatic interactive documentation.
  source: S2
  evidence: "With automatic interactive documentation."

## Sources

- [S1] Quickstart. Flask docs. https://flask.palletsprojects.com/en/stable/quickstart/ . License: BSD-3-Clause. Accessed 2026-11-16.

- [S2] FastAPI. FastAPI docs. https://fastapi.tiangolo.com/ . License: MIT. Accessed 2026-11-16.

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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
