experimental/sources/: uvicorn-0.29.0 metadata and description

Simple index

The lightning-fast ASGI server.

author_email Tom Christie <tom@tomchristie.com>
  • Development Status :: 4 - Beta
  • Environment :: Web Environment
  • Intended Audience :: Developers
  • License :: OSI Approved :: BSD License
  • Operating System :: OS Independent
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: Implementation :: CPython
  • Programming Language :: Python :: Implementation :: PyPy
  • Topic :: Internet :: WWW/HTTP
description_content_type text/markdown
  • Changelog, https://github.com/encode/uvicorn/blob/master/CHANGELOG.md
  • Funding, https://github.com/sponsors/encode
  • Homepage, https://www.uvicorn.org/
  • Source, https://github.com/encode/uvicorn
provides_extras standard
  • click>=7.0
  • h11>=0.8
  • typing-extensions>=4.0; python_version < '3.11'
  • colorama>=0.4; (sys_platform == 'win32') and extra == 'standard'
  • httptools>=0.5.0; extra == 'standard'
  • python-dotenv>=0.13; extra == 'standard'
  • pyyaml>=5.1; extra == 'standard'
  • uvloop!=0.15.0,!=0.15.1,>=0.14.0; (sys_platform != 'win32' and (sys_platform != 'cygwin' and platform_python_implementation != 'PyPy')) and extra == 'standard'
  • watchfiles>=0.13; extra == 'standard'
  • websockets>=10.4; extra == 'standard'
requires_python >=3.8
File Tox results History
40 KB


An ASGI web server, for Python.

Build Status Package version Supported Python Version

Documentation: https://www.uvicorn.org

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 supports HTTP/1.1 and WebSockets.


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:

Moreover, "optional extras" means that:

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


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.


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 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 is an adapter for using ASGI applications with AWS Lambda & API Gateway.

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

— 🦄 —