Skip to content
BENIBIX Learn

Flask

Development🌐 Web DevelopmentFrameworks

Also known as Flask Framework, Python Flask

A small Python web framework. It gives you the basics, and you add the rest.

Think of it like

Think of it like an empty workbench. It is small and tidy, and you bring the tools you want.

Example

Jack builds a small API for his weather sensor with Flask. The whole app is one file of 30 lines.

Why it matters

Flask is a gentle start for Python web work. It stays out of your way.

Definition

Flask is a small Python web framework that gives you just the basics. You get routing, request handling and templates, and you add the rest as you need it. It is often called a micro-framework because its core is so small. It was first released in 2010 and is popular for small apps, APIs and learning. Its simplicity makes it easy to see how a web app works.

Example code

python
from flask import Flask
app = Flask(__name__)

@app.route("/")
def home():
    return "Hi Emma"
A complete Flask app with one page.

Common mistake

Growing a Flask app to a huge size without any structure. Split it into blueprints early.

Key takeaways

  1. 1
    Just the basics. Routes, requests, templates.
  2. 2
    Add as you go. Pick your own extras.
  3. 3
    Easy to read. Great for learning.

Compare