uvicorn
Lightning-fast ASGI server for running async Python web apps (FastAPI, Starlette).
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.
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.
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.
Ready to explore the full API?
See every class, function, and relationship in an interactive graph.