Basically, flask is a minimalistic framework that behaves the same as MVC framework. So MVC will be perfectly suitable for the flask and we will consider the MVC pattern in the below example.
from flask import Flask
In this code your,
app = Flask(_name_)
@app.route(“/”)
Def hey():
return “Welcome to Appmajix”
app.run(debug = True)
The following code can be fragmented into
Configuration part will be,
In this code your,
app = Flask(_name_)
View part will be,
@app.route(“/”)
Def hey():
return “Welcome to Appmajix”
While your main part will be,
app.run(debug = True)