Backend and APIs · Framework

Flask

A small, flexible Python web framework that handles routing and requests and leaves every other choice to you.

Frameworks · Open source · updated

How it works

A Flask app can be a single file: create the app, decorate functions with @app.route and return a response. It is built on Werkzeug (the request and routing layer) and Jinja (templates), and extensions add the rest, such as Flask-SQLAlchemy for databases, Flask-Login for sessions and Flask-WTF for forms.

Armin Ronacher released it in 2010, and the Pallets project maintains it. It is a WSGI framework: async views exist, but it lacks the async-first design of FastAPI. It remains a common choice for small services, internal tools, webhook receivers and teaching, where a tiny core that is easy to read matters more than built-in features.

Flask pros and cons

Pros

  • Very small core that is quick to learn and read
  • Complete freedom over structure and libraries
  • Mature, with extensions for most needs

Cons

  • Larger apps need discipline, because there is no set structure
  • No built-in validation or API docs
  • Not async-first, so FastAPI suits high-concurrency APIs better

When to use Flask

Pick it when

  • Small APIs, webhook receivers and internal tools in Python
  • Prototypes and teaching, where a readable single file helps

Skip it when

  • You want admin, ORM and accounts ready-made (Django) or typed async APIs (FastAPI)

Flask pricing

Open source

Free (BSD licence).

Approximate, checked September 2026.What the other tools cost

Flask vs the alternatives

More in Backend and APIs

Frameworks

All 26 Backend and APIs terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.