Flask Cheatsheet
What is Flask Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. It has no database abstraction layer, form validation, or any other components where pre-existing third-party libraries provide common functions. Importing Flask from flask import Flask Most used import functions These are some of the most used import functions from flask import Flask, render_template, redirect, url_for, request Boilerplate This is the basic template or barebone structure of Flask. from flask import Flask app = Flask(__name__) @app.route("/") def hello_world(): return "<p>Hello, World!</p>" app.run() route(endpoint) This is to make different endpoints in our flask app. @app.route("/") Route method Allowing get and post requests on an endpoint. methods = ['GET', 'POST'] Re-run while coding This is used to automatically rerun the pr...