Pythie
CategoriesTrending
An open index of Python tools.Pythie’s IndexLegal noticePrivacyData: PyPI (package metadata; download statistics under CC BY 4.0, via ClickHouse), deps.dev (CC BY 4.0), GitHub, OSV.

uvicorn

0.55.0ActivePythie’s Index: 84

The lightning-fast ASGI server.

Actively maintained. Last release 2 days ago, commits in 21 of the last 26 weeks. A safe choice.

Web FrameworksHTTP & Networking
$pip install uvicorn
Kludex/uvicornHomepagePyPI

uvicorn

An ASGI web server, for Python.


Build Status Package version Supported Python Version Discord


Documentation: https://uvicorn.dev

Source Code: https://www.github.com/Kludex/uvicorn


Uvicorn is an ASGI web server implementation for Python.

Until recently Python has lacked a minimal low-level server/application interface for async frameworks. The ASGI specification fills this gap, and means we're now able to start building a common set of tooling usable across all async frameworks.

Uvicorn currently supports HTTP/1.1, HTTP/2 and WebSockets.

Sponsors

Help us keep Uvicorn maintained and sustainable by becoming a sponsor.

Sponsors

Quickstart

Install using pip:

$ pip install uvicorn

This will install uvicorn with minimal (pure Python) dependencies.

$ pip install 'uvicorn[standard]'

This will install uvicorn with "Cython-based" dependencies (where possible) and other "optional extras".

In this context, "Cython-based" means the following:

  • the event loop uvloop will be installed and used if possible.
  • the http protocol will be handled by httptools if possible.

Moreover, "optional extras" means that:

  • the websocket protocol will be handled by websockets (should you want to use wsproto you'd need to install it manually) if possible.
  • the --reload flag in development mode will use watchfiles.
  • python-dotenv will be installed should you want to use the --env-file option.
  • PyYAML will be installed to allow you to provide a .yaml file to --log-config, if desired.

Create an application, in example.py:

async def app(scope, receive, send):
    assert scope['type'] == 'http'

    await send({
        'type': 'http.response.start',
        'status': 200,
        'headers': [
            (b'content-type', b'text/plain'),
        ],
    })
    await send({
        'type': 'http.response.body',
        'body': b'Hello, world!',
    })

Run the server:

$ uvicorn example:app

Why ASGI?

Most well established Python Web frameworks started out as WSGI-based frameworks.

WSGI applications are a single, synchronous callable that takes a request and returns a response. This doesn’t allow for long-lived connections, like you get with long-poll HTTP or WebSocket connections, which WSGI doesn't support well.

Having an async concurrency model also allows for options such as lightweight background tasks, and can be less of a limiting factor for endpoints that have long periods being blocked on network I/O such as dealing with slow HTTP requests.


Alternative ASGI servers

A strength of the ASGI protocol is that it decouples the server implementation from the application framework. This allows for an ecosystem of interoperating webservers and application frameworks.

Daphne

The first ASGI server implementation, originally developed to power Django Channels, is the Daphne webserver.

It is run widely in production, and supports HTTP/1.1, HTTP/2, and WebSockets.

Any of the example applications given here can equally well be run using daphne instead.

$ pip install daphne
$ daphne app:App

Hypercorn

Hypercorn was initially part of the Quart web framework, before being separated out into a standalone ASGI server.

Hypercorn supports HTTP/1.1, HTTP/2, and WebSockets.

It also supports the excellent trio async framework, as an alternative to asyncio.

$ pip install hypercorn
$ hypercorn app:App

Mangum

Mangum is an adapter for using ASGI applications with AWS Lambda & API Gateway.

Granian

Granian is an ASGI compatible Rust HTTP server which supports HTTP/2, TLS and WebSockets.


Uvicorn is BSD licensed code.
Designed & crafted with care.

— 🦄 —

Popularity

Downloads / month
694.8M
GitHub stars
11.2K
Downloads, last 7 days
161.3M-2%
Stars, last 7 days
–
Direct dependents
15K
All dependents
54.7K

Pythie’s Index

How it works
84

Healthy

Maintenance, out of 100

  • Recent release

    last release 0 days ago

  • Commit activity

    21/26 weeks with commits

  • Release cadence

    23 releases in 12 months

  • Issues & PRs handled

    76% closed in the past year

  • Contributor spread

    16 authors in last 100 commits

  • OpenSSF Scorecard

    not evaluated

Commits, last 26 weeks110

Releases

Latest
0.55.0
Released
Nov 28, 2026
Releases, 12 months
23
First release
Jun 5, 2017

Compatibility

Requires Python
>=3.11
Tested on
3.11 · 3.12 · 3.13 · 3.14 · 3.15
License
BSD-3-Clause (Permissive)

Keywords

pythonasyncioasgihttphttp-server

Alternatives

Use instead of uvicorn: tools that do the same job, closest first.

Compare with granian →Compare with daphne →Compare with Hypercorn →Compare all 4 →

  • granian2.8.9ActivePythie’s Index: 83

    A Rust HTTP server for Python applications

    Web FrameworksHTTP & Networking5.8K14.1M/moReleased Nov 20, 2026
  • daphne4.2.3ActivePythie’s Index: 53

    Django ASGI (HTTP/WebSocket) server

    Web FrameworksHTTP & Networking2.7K5.2M/moReleased Jul 21, 2026
  • Hypercorn0.18.0MaintainedPythie’s Index: 24

    A ASGI Server based on Hyper libraries and inspired by Gunicorn

    Web FrameworksHTTP & Networking1.6K8.2M/moReleased Nov 8, 2025

Works well with

Use together with uvicorn: extensions, drivers, servers and companion tools.

  • FlaskPythie’s Index: 57A simple framework for building complex web applications.198.6M downloads/mo
  • starlettePythie’s Index: 90The little ASGI library that shines.722.7M downloads/mo
  • websocketsPythie’s Index: 86An implementation of the WebSocket Protocol (RFC 6455 & 7692)553.4M downloads/mo
  • uvloopPythie’s Index: 56Fast implementation of asyncio event loop on top of libuv298.8M downloads/mo
  • fastapiPythie’s Index: 86FastAPI framework, high performance, easy to learn, fast to code, ready for production561.9M downloads/mo
  • sse-starlettePythie’s Index: 85SSE plugin for Starlette356.9M downloads/mo