uvicorn 0.38.0


pip install uvicorn

  Latest version

Released: Oct 18, 2025


Meta
Author: Tom Christie
Maintainer: Marcelo Trylesinski
Requires Python: >=3.9

Classifiers

Development Status
  • 4 - Beta

Environment
  • Web Environment

Intended Audience
  • Developers

Operating System
  • OS Independent

Programming Language
  • Python :: 3
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

Topic
  • Internet :: WWW/HTTP

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

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.
  • windows users will have colorama installed for the colored logs.
  • 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.

— 🦄 —

0.38.0 Oct 18, 2025
0.37.0 Sep 23, 2025
0.36.1 Sep 23, 2025
0.36.0 Sep 20, 2025
0.35.0 Jun 28, 2025
0.34.3 Jun 01, 2025
0.34.2 Apr 19, 2025
0.34.1 Apr 13, 2025
0.34.0 Dec 15, 2024
0.33.0 Dec 14, 2024
0.32.1 Nov 20, 2024
0.32.0 Oct 15, 2024
0.31.1 Oct 09, 2024
0.31.0 Sep 27, 2024
0.30.6 Aug 13, 2024
0.30.5 Aug 02, 2024
0.30.4 Jul 31, 2024
0.30.3 Jul 20, 2024
0.30.2 Jul 20, 2024
0.30.1 Jun 02, 2024
0.30.0 May 28, 2024
0.29.0 Mar 20, 2024
0.28.1 Mar 19, 2024
0.28.0 Mar 09, 2024
0.27.1 Feb 10, 2024
0.27.0.post1 Jan 29, 2024
0.27.0 Jan 22, 2024
0.26.0 Jan 16, 2024
0.25.0 Dec 20, 2023
0.24.0.post1 Nov 06, 2023
0.24.0 Nov 04, 2023
0.23.2 Jul 31, 2023
0.23.1 Jul 18, 2023
0.23.0 Jul 15, 2023
0.22.0 Apr 28, 2023
0.21.1 Mar 16, 2023
0.21.0 Mar 09, 2023
0.20.0 Nov 20, 2022
0.19.0 Oct 19, 2022
0.18.3 Aug 24, 2022
0.18.2 Jun 27, 2022
0.18.1 Jun 23, 2022
0.18.0 Jun 23, 2022
0.17.6 Mar 11, 2022
0.17.5 Feb 16, 2022
0.17.4 Feb 04, 2022
0.17.3 Feb 03, 2022
0.17.2 Feb 03, 2022
0.17.1 Jan 28, 2022
0.17.0.post1 Jan 24, 2022
0.17.0 Jan 14, 2022
0.16.0 Dec 08, 2021
0.15.0 Aug 13, 2021
0.14.0 Jun 01, 2021
0.13.4 Feb 20, 2021
0.13.3 Dec 29, 2020
0.13.2 Dec 20, 2020
0.13.1 Dec 12, 2020
0.13.0 Dec 08, 2020
0.12.3 Nov 22, 2020
0.12.2 Oct 19, 2020
0.12.1 Sep 30, 2020
0.12.0 Sep 28, 2020
0.11.8 Jul 31, 2020
0.11.7 Jul 28, 2020
0.11.6 Jul 17, 2020
0.11.5 Apr 29, 2020
0.11.4 Apr 28, 2020
0.11.3 Feb 17, 2020
0.11.2 Jan 20, 2020
0.11.1 Dec 20, 2019
0.11.0 Dec 20, 2019
0.10.9 Dec 19, 2019
0.10.8 Nov 12, 2019
0.10.7 Nov 12, 2019
0.10.6 Nov 12, 2019
0.10.5 Nov 12, 2019
0.10.4 Nov 09, 2019
0.10.3 Nov 01, 2019
0.10.2 Oct 31, 2019
0.10.1 Oct 31, 2019
0.10.0 Oct 29, 2019
0.9.1 Oct 21, 2019
0.9.0 Sep 06, 2019
0.8.6 Aug 01, 2019
0.8.5 Aug 01, 2019
0.8.4 Jul 11, 2019
0.8.3 Jun 28, 2019
0.8.2 Jun 21, 2019
0.8.1 Jun 18, 2019
0.8.0 Jun 18, 2019
0.7.3 Jun 18, 2019
0.7.2 Jun 05, 2019
0.7.1 May 02, 2019
0.7.0 Apr 18, 2019
0.7.0b2 Mar 29, 2019
0.7.0b1 Mar 20, 2019
0.6.1 Mar 14, 2019
0.6.0 Mar 12, 2019
0.5.2 Mar 11, 2019
0.5.1 Mar 05, 2019
0.5.0 Mar 04, 2019
0.4.6 Feb 25, 2019
0.4.5 Feb 18, 2019
0.4.4 Feb 14, 2019
0.4.3 Feb 07, 2019
0.4.2 Feb 05, 2019
0.4.1 Jan 25, 2019
0.4.0 Jan 25, 2019
0.3.32 Jan 23, 2019
0.3.31 Jan 22, 2019
0.3.30 Jan 22, 2019
0.3.29 Jan 21, 2019
0.3.28 Jan 21, 2019
0.3.27 Jan 21, 2019
0.3.26 Jan 21, 2019
0.3.25 Jan 18, 2019
0.3.24 Jan 02, 2019
0.3.23 Dec 18, 2018
0.3.22 Dec 07, 2018
0.3.21 Nov 19, 2018
0.3.20 Nov 06, 2018
0.3.19 Nov 05, 2018
0.3.18 Nov 05, 2018
0.3.17 Oct 29, 2018
0.3.16 Oct 22, 2018
0.3.15 Oct 22, 2018
0.3.14 Oct 19, 2018
0.3.13 Oct 16, 2018
0.3.12 Oct 09, 2018
0.3.11 Oct 09, 2018
0.3.10 Oct 09, 2018
0.3.9 Oct 05, 2018
0.3.8 Oct 04, 2018
0.3.7 Oct 04, 2018
0.3.6 Sep 28, 2018
0.3.5 Sep 07, 2018
0.3.4 Sep 06, 2018
0.3.3 Sep 05, 2018
0.3.2 Aug 17, 2018
0.3.1 Aug 15, 2018
0.3.0 Aug 14, 2018
0.2.22 Jul 27, 2018
0.2.21 Jul 25, 2018
0.2.20 Jul 23, 2018
0.2.19 Jul 20, 2018
0.2.18 Jul 20, 2018
0.2.17 Jul 19, 2018
0.2.16 Jul 19, 2018
0.2.15 Jul 19, 2018
0.2.14 Jul 19, 2018
0.2.13 Jul 18, 2018
0.2.12 Jul 13, 2018
0.2.11 Jul 12, 2018
0.2.10 Jul 12, 2018
0.2.9 Jul 10, 2018
0.2.8 Jul 10, 2018
0.2.7 Jul 06, 2018
0.2.6 Jul 05, 2018
0.2.5 Jul 04, 2018
0.2.4 Jul 04, 2018
0.2.3 Jul 02, 2018
0.2.2 Jun 29, 2018
0.2.1 Jun 29, 2018
0.2.0 Jun 29, 2018
0.1.1 Apr 20, 2018
0.1.0 Apr 09, 2018
0.0.15 Aug 11, 2017
0.0.14 Jul 07, 2017
0.0.13 Jun 29, 2017
0.0.12 Jun 27, 2017
0.0.11 Jun 27, 2017
0.0.10 Jun 14, 2017
0.0.9 Jun 14, 2017
0.0.8 Jun 14, 2017
0.0.7 Jun 13, 2017
0.0.6 Jun 12, 2017
0.0.5 Jun 12, 2017
0.0.4 Jun 06, 2017
0.0.3 Jun 05, 2017
0.0.2 Jun 05, 2017
0.0.1 Jun 05, 2017

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
click (>=7.0)
h11 (>=0.8)
typing-extensions (>=4.0)