On this page
article
Flask Blueprint
Organize routes with blueprints.
Category: flask
Problem
Organize routes with blueprints.
Solution
bp = Blueprint("api", __name__, url_prefix="/api")
app.register_blueprint(bp)
Notes
- Adapt variable names and paths to your project
- Add error handling for production use
- See related chapters in the Learning Path