Written by Sümeyye Sever (notes I took while learning Python)


Flask is a micro-framework for web development in Python. It is called a "micro" framework because it keeps the core functionality simple and extensible. Flask is ideal for small to medium-sized applications and provides the flexibility to add components as needed.

Basic Workflow of a Flask Application

Step 1: Installation

Install Flask using pip:

pip install flask

Step 2: Creating a Basic Flask App

from flask import Flask

app = Flask(__name__)

@app.route("/")
def home():
    return "Hello World!"

if __name__ == "__main__":
    app.run(debug=True)

Step 3: Running the Application

After runnig the script, application will be accessible at http://127.0.0.1:5000/.