# Flask

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

**Field:** Software Development  
**Category:** Web Development  
**Also known as:** Flask Framework, Python Flask

## Think of it like

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

## 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

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

## Example code

```python
from flask import Flask
app = Flask(__name__)

@app.route("/")
def home():
    return "Hi Emma"
```

A complete Flask app with one page.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [Django](https://learn.benibix.com/term/development/django)
- [Python](https://learn.benibix.com/term/development/python)
- [Express.js](https://learn.benibix.com/term/development/express)
- [Web Routing](https://learn.benibix.com/term/development/routing)
- [FastAPI](https://learn.benibix.com/term/development/fastapi)

## Told apart from

- [Django vs Flask](https://learn.benibix.com/compare/django-vs-flask): Django and Flask are both Python web frameworks. Django comes with most of what a site needs, from logins to an admin page. Flask gives you just the basics and you add the rest.

---

Source: https://learn.benibix.com/term/development/flask
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
