Structuring large Flask application? [closed] Structuring large Flask application? [closed] flask flask

Structuring large Flask application? [closed]


There is some good guidance in the docs. Flask doesn't impose a lot of forced structure but your on the right track for getting in the habit of structuring your projects for your own sanity. This could be entirely left to you how you would like to do this. Probably a lot of opinions out there

What I tend to do is create a structure typical of most python projects. You may want to use an application factory pattern and blueprints.

myapp/myapp    /home        views.py    /templates    /static    factory.py    core.py    models.pyrunserver.pyconfig.py

Mattupstate has a good blog article on this subject. There is also Fbone. Miguel Grinberg has a chapter in his Flask book dedicated to this too.