DEV Community

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

Posted on

4 3

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay