Oct-16-2021, 08:28 PM
(Oct-16-2021, 06:39 PM)muzikman Wrote: Maybe Flask has a package for APIs? I know Flask has a something close to the MVC convention. However, I looked over the docs and it seems as though the app.py is similar to a controller in PHP frameworks. However, I don't like the idea of having all of my functions in one file.There are serval eg Flask-REST-JSONAPI, Flask-RESTPlus.
A tutorial How to build a JSON API with Python
Quote:However, I don't like the idea of having all of my functions in one fileIt's normal for any lager project to spilt up it in serval files eg views, model...ect,
in Flask you have full freedom(good and bad).
What i can mean bye bad is eg Django you get full project in a MVC style,in Flask you have to construct this yourself.
I use similar setup as this Organizing a Flask Project Beyond Single File
There are a lot tutorial for this in Flask and cookiecutter if search for Flask(cookiecutter) there are many project starter templates.