flask
A simple framework for building complex web applications
Django's 'batteries included' approach is a blessing for large apps but a burden for small ones โ you get an ORM, admin panel, and template engine whether you want them or not. Armin Ronacher built Flask as a microframework: give developers the essentials (routing, request/response) and let them pick everything else.
Flask is a WSGI application at its core. You register routes with @app.route() decorators, and each route is just a Python function that returns a response. There's no magic โ what you see is what runs. Extensions (SQLAlchemy, Flask-Login, etc.) slot in cleanly when you need them.
Install flask
pip install flask
import flaskUse it when
Use Flask for small-to-medium web apps and APIs where you want to control the stack, for prototypes where you need something running fast, or when teaching web development concepts without the complexity of Django.
Skip it when
Flask becomes painful as an app grows โ you end up assembling Django yourself from extensions. For async APIs, FastAPI is a better starting point. For anything needing built-in auth, admin, or ORM, Django pays off faster.
Ready to explore the full API?
See every class, function, and relationship in an interactive graph.