0Pricing
Flask Academy · Lesson

Register Blueprints in the Factory

Wire all blueprints during app assembly.

The Final Assembly

With the app built and extensions bound, the last factory job is wiring up your routes. You do that by registering blueprints. 🧩

A Quick Blueprint Recall

A blueprint groups related routes into a reusable module. The factory is exactly where you attach those groups to the app.

from flask import Blueprint
main = Blueprint("main", __name__)

All lessons in this course

  1. Problems with a Global app Object
  2. Write a create_app Function
  3. Init Extensions with init_app
  4. Register Blueprints in the Factory
← Back to Flask Academy