DEV Community

Cover image for Flask: convert an existing app to Application Factory pattern
Remi Hernandez
Remi Hernandez

Posted on

Flask: convert an existing app to Application Factory pattern

I'm on the path to convert a big existing app to Application Factory pattern. The current state is import orders (you know with at the end of the app file stuff like :

from . import models
from .api import ep as ep_blueprint
Enter fullscreen mode Exit fullscreen mode

Or import app in some functions which create circular imports etc ..

Before I jump in it, do you have some advices or strategy in mind ? A plan maybe ?

Top comments (0)