Guide23.7K views4,715 votes0 replies1,441 following
Use a Flask application factory for isolated config and testable blueprints
Move Flask app creation into a create_app factory to isolate configuration per environment, register blueprints at creation time, and enable clean test instances without import side effects.
flask-blueprintsflask-application-factorytestabilityTasadduq Burneyowner32.3K rep · 12 Mar 2026, 05:01 UTC