talira

A lightweight WSGI web application framework for Python

open sourceBSD-3-Clausefree

Flask is a lightweight WSGI web application framework for Python, designed to make getting started quick and easy while scaling up to complex applications. It began as a simple wrapper around the Werkzeug WSGI toolkit and the Jinja template engine, and adds routing, request and response objects, sessions, blueprints for structuring larger apps and a flask command built on Click. Flask suggests but doesn't enforce dependencies or a project layout: databases, forms and authentication come from the libraries and community extensions you choose. It is developed by the Pallets organization, alongside Werkzeug, Jinja and Click.

Problems it solves

  • a small Python web framework where I choose my own database and libraries
  • spin up a simple web app or API in Python in a few lines
  • render HTML pages with Jinja templates from a Python backend
  • build a lightweight backend for a prototype without Django's batteries
  • structure a growing Python web app into modules with blueprints
  • serve a machine learning model behind a simple HTTP endpoint in Python
  • a Python web framework with lots of extensions for auth, forms and databases

Features

  • routing with decorators
  • Jinja templating
  • built-in development server and debugger
  • blueprints for modular apps
  • sessions and request/response objects
  • flask CLI built on Click
  • community extensions
  • async view support

Limitations

  • Flask supports Python 3.9 and newer.1

Alternatives

The same job

These do what Flask does.

  1. Django The web framework for perfectionists with deadlines.
  2. FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production

Compare Flask with the top 3