Pythonuvicornv0.30.6
PythonBeginner-friendly

uvicorn

Lightning-fast ASGI server for running async Python web apps (FastAPI, Starlette).

asgiserverfastapiasyncproduction
The Problem

You've built a FastAPI or Starlette app. Now how do you actually run it? Flask had Flask run, but ASGI apps need an ASGI server. And when you deploy to production, you need something that handles concurrency, workers, and doesn't crash under load.

Mental Model

Uvicorn is the engine under your ASGI app. It handles TCP connections, HTTP parsing, and translates them into ASGI scope/receive/send calls that your app understands. Pair with Gunicorn (uvicorn workers) in production for multi-core scaling.

60-second start

Run a FastAPI app for development

pip install uvicorn[standard]
uvicorn main:app --reload --port 8000
# main.py
import uvicorn
if __name__ == '__main__':
    uvicorn.run('main:app', host='0.0.0.0', port=8000, reload=True)

Use it when

Running any ASGI framework: FastAPI, Starlette, Django Channels, Litestar. Development server with hot reload. Production with Gunicorn+uvicorn workers.

Skip it when

WSGI apps (Flask, Django without Channels) โ€” use gunicorn with sync workers instead.

Alternatives
gunicornWSGI server, but pairs with uvicorn workers for production ASGI deployments.
hypercornASGI server with HTTP/2 and HTTP/3 support out of the box.
daphneDjango Channels' official ASGI server, tightly integrated with Django.

Ready to explore the full API?

See every class, function, and relationship in an interactive graph.