Flask is a lightweight WSGI web framework for Python that keeps getting started simple while allowing complex applications. It wraps Werkzeug and Jinja without forcing a fixed project layout.
Overview
Flask gives Python developers a small core for building web applications and HTTP APIs. It began as a wrapper around Werkzeug and Jinja and has become a widely used choice for Python web work. The framework offers suggestions but does not mandate dependencies or directory structure; developers pick their own tools and extensions.
Sites are built with routing, templates, static files, sessions, request data access, redirects, error handling, and logging. Blueprints support modular applications, and extensions from the community add databases, forms, authentication, and other capabilities documented in the official guides.
The documentation covers installation, a minimal quickstart, a fuller tutorial, patterns for larger apps, deployment to web servers, testing, configuration from files and environment variables, signals, class-based views, and a CLI integrated via Click. Flask depends on Werkzeug, Jinja, and Click.
Key features
- WSGI application core
- Jinja template rendering
- Blueprints for modular apps
- Click-based CLI
- Session and message flashing
- Community extension ecosystem
- Configurable without enforced layout
- Development server and testing client
Use cases
- Small HTTP APIs
- Server-rendered web apps
- Prototyping Python backends
- Microservices with custom stacks