Flask

Web Framework

The entry point for Flask applications is a file named app.py.

app.py
@app.route('/', methods=['GET'])
def index():
    return render_template('index.html')

By using @app.route, we indicate the route we want to create. The path will be /, which is the default route. We indicate this will be used for GET.

Last updated