talira

ASGI web server for Python with HTTP/1.1, HTTP/2 and WebSockets

open sourceBSD-3-Clauseself-hostablefree

Uvicorn is an ASGI web server for Python that runs async web apps built on the ASGI interface. It supports HTTP/1.1, HTTP/2 and WebSockets. A plain install has minimal pure-Python dependencies; the standard extra adds uvloop, httptools, websockets, watchfiles for --reload in development, python-dotenv for --env-file and PyYAML for YAML log config. Its README names Daphne and Hypercorn as alternative ASGI servers.

Ways to install

Package managers

Problems it solves

  • run my FastAPI or Starlette app in production
  • serve an async Python web app with WebSockets
  • reload my Python web server automatically while developing

Features

  • ASGI server for async Python web apps
  • HTTP/1.1, HTTP/2 and WebSockets
  • optional uvloop and httptools for speed
  • auto-reload in development with watchfiles
  • env files and YAML logging config

Alternatives

The same job

These do what Uvicorn does.

  1. Hypercorn ASGI and WSGI web server for Python with HTTP/2, WebSockets and optional HTTP/3
  2. Daphne HTTP, HTTP/2 and WebSocket server for ASGI apps, built to power Django Channels
  3. Gunicorn Python WSGI HTTP server for UNIX

Compare Uvicorn with the top 3