Overview
Flask is a lightweight WSGI web application framework designed to make getting started quick while allowing apps to grow. It began as a small wrapper around the Werkzeug WSGI toolkit and the Jinja template engine, uses Click for its command line, and has become one of the most popular Python web frameworks since its first release in 2010.
Flask suggests but does not enforce dependencies or project layout. Blueprints split larger apps into modules, the application factory pattern supports configuration per environment, and the docs include patterns for SQLAlchemy, WTForms, file uploads, caching and background tasks with Celery.
The Pallets organisation, a community group of maintainers, develops Flask together with the libraries it uses, including Werkzeug, Jinja and Click. Flask supports async views, but it remains a WSGI framework; its documentation has a section on when to use Quart, Pallets' ASGI counterpart, instead.
Because Flask is minimal, production apps rely on community-maintained extensions for databases, login and migrations, whose quality and maintenance vary.
Pricing and plans
What it does
- Routing and views
- Decorator-based routes plus class-based views for APIs.
- Jinja templates
- Server-side templating with autoescaping and template inheritance.
- Blueprints
- Split an application into reusable, registrable modules.
- CLI and dev server
- flask run, a shell and custom commands through Click.
- Test client
- Built-in client for sending requests in tests.
- Extensions
- Community extensions add ORM, auth, forms, migrations and more.
Strengths and limitations
Strengths
- Small, easy to learn core
- No enforced structure or dependencies
- Mature, stable and well documented
- Large set of community extensions and tutorials
Limitations
- No built-in ORM, auth, admin or validation; you choose extensions
- A WSGI framework: the docs point to Quart when you need a fully async (ASGI) app
- Extension quality and maintenance vary because most are community projects
- Large apps need your own conventions to stay organised
Who it suits
Good for
- Prototypes and small web apps
- Simple APIs and internal tools
- Learning Python web development
Look elsewhere if
- Teams wanting admin, ORM and auth built in (see Django)
- High-concurrency async APIs (see FastAPI or Litestar)
Alternatives to Flask
Questions
Is Flask still maintained?
Yes, by the Pallets organisation, which also maintains Werkzeug, Jinja and Click.
Flask or Django?
Flask is minimal and lets you pick libraries; Django bundles ORM, admin and auth.
Does Flask support async?
It supports async views, but it is a WSGI framework; the docs suggest Quart for fully async apps.
Is Flask free for commercial use?
Yes. It is BSD 3-Clause licensed.
Sources read for this page