Web Servers in Python

5 projects in Web Development. Most starred: uvicorn, gunicorn and granian.

Python web apps talk to servers through one of two interfaces. WSGI is synchronous and serves Django and Flask; ASGI adds async support, WebSockets and long-lived connections for FastAPI, Starlette and Django's async mode. Gunicorn is the long-standing pre-fork WSGI server on Unix: a master process manages several worker processes, and worker classes let it host ASGI apps too. Waitress is a pure-Python, multithreaded WSGI server that also runs on Windows.

For ASGI, Uvicorn is the most common choice and uses uvloop and httptools when they are installed. Hypercorn supports HTTP/2 and HTTP/3 and can run on Trio as well as asyncio. Granian is written in Rust on Hyper and Tokio and can serve ASGI, WSGI and its own RSGI interface from one server. In production, these usually sit behind a reverse proxy or load balancer, with the worker count tuned to the available CPU cores.

ASGI3

uvicorn

A lightning-fast ASGI server implementation.

11kupdated today0.54.0

granianRust core

A Rust HTTP server for Python apps built on Hyper and Tokio, supporting WSGI/ASGI/RSGI.

5.7kupdated 2d ago2.8.5

hypercorn

An ASGI and WSGI Server based on Hyper libraries and inspired by Gunicorn.

1.6kupdated 11mo ago

WSGI2

gunicorn

A pre-fork WSGI server with a native ASGI worker, ported from Ruby's Unicorn project.

10.7kupdated 1mo ago26.2.2

waitress

Multi-threaded, powers Pyramid.

1.6kupdated 27d ago3.0.2
Esc

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