Web Frameworks in Python

9 projects in Web Development. Most starred: django, flask and reflex.

Django is the batteries-included choice: ORM, migrations, admin, authentication, forms and templates in one package, with a large ecosystem of reusable apps. It fits database-backed sites with users and content. Flask is a microframework that gives you routing, request handling and Jinja templates, and you choose extensions for the rest. Bottle goes smaller still, a single file with no dependencies outside the standard library. Pyramid sits in between, starting small and scaling to large apps through explicit configuration.

On the async side, Starlette is a lightweight ASGI toolkit and the base FastAPI is built on. Litestar is a complete ASGI framework with dependency injection, validation and OpenAPI generation. Tornado predates asyncio and is still used for long-lived connections. Reflex and FastHTML aim at building whole apps in Python: Reflex compiles your UI to a React frontend, while FastHTML returns server-rendered HTML and uses HTMX for interactivity.

Sync frameworks run under a WSGI server such as Gunicorn, and async ones under an ASGI server such as Uvicorn or Granian. Django also supports async views and ASGI deployment, so choosing it does not rule out async code. For JSON APIs rather than HTML pages, see the Web APIs section.

Deeper lists: awesome-flaskawesome-django

Synchronous5

flask

A microframework for Python.

75kupdated 17d ago3.1.3

django

A high-level web framework that encourages rapid development and clean, pragmatic design.

91.6kupdated today

bottle

A fast and simple micro-framework distributed as a single file with no dependencies.

8.8kupdated 1d ago0.13.4

pyramid

A small, fast, down-to-earth, open source Python web framework.

4.1kupdated 2mo ago

fasthtml

The fastest way to create an HTML app.

7.1kupdated 3d ago0.14.14

Asynchronous4

starlette

A lightweight ASGI framework and toolkit for building high-performance async services.

12.7kupdated today1.10.0

tornado

A web framework and asynchronous networking library.

22.2kupdated 3d ago

litestar

Production-ready, capable and extensible ASGI Web framework.

8.5kupdated 4d ago2.25.0

reflex

A framework for building reactive, full-stack web applications entirely with Python.

29kupdated today0.10.0
Esc

Type to search every entry. ↑↓ to move, Enter to open.