← All notes

A Flask blueprint records routes to register on an application later

Answer: A Flask blueprint is not itself an application. It is a set of operations you register on an application, and you may do that more than once. You can register a blueprint at a URL prefix and/or subdomain, and it can provide template filters, static files, and templates.

Why blueprints exist

Blueprints provide separation at the Flask level, share application config, and can change an application object when registered. When you decorate a function with @blueprint.route, the blueprint records the intent to register that function later. The blueprint name is prepended to the endpoint name; it does not itself change the URL.

You cannot unregister a blueprint from an already created application without destroying that application object.

The class in source

Blueprint is a collection of routes and other app-related functions that can be registered later. It uses the same decorators as Flask, but defers the need for an application object by recording those calls.

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 and notices: Flask documentation and source (pallets/flask): Copyright 2010 Pallets; BSD-3-Clause (https://raw.githubusercontent.com/pallets/flask/main/LICENSE.txt). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Flask docs and Flask source (pallets/flask), BSD-3-Clause (https://raw.githubusercontent.com/pallets/flask/main/LICENSE.txt). Notices: Flask documentation and source (pallets/flask): Copyright 2010 Pallets; BSD-3-Clause (https://raw.githubusercontent.com/pallets/flask/main/LICENSE.txt).

Cite this

Permanent ID: iil:note:c7m0jea2

iinventedlight. 2026. "A Flask blueprint records routes to register on an application later." iinventedlight Library, iil:note:c7m0jea2, version of 2026-11-11. https://iinventedlight.com/library/notes/flask-blueprints/. License: CC-BY-4.0.

@misc{iil_note_c7m0jea2,
  author = {{iinventedlight}},
  title = {{A Flask blueprint records routes to register on an application later}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-11},
  url = {https://iinventedlight.com/library/notes/flask-blueprints/},
  note = {Permanent ID iil:note:c7m0jea2. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

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