Skip to main content
https://img.shields.io/github/workflow/status/MagicStack/uvloop/Tests https://img.shields.io/pypi/v/uvloop.svg PyPI - Downloads

uvloop is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood.

The project documentation can be found here. Please also check out the wiki.

Performance

uvloop makes asyncio 2-4x faster.

https://raw.githubusercontent.com/MagicStack/uvloop/master/performance.png

The above chart shows the performance of an echo server with different message sizes. The sockets benchmark uses loop.sock_recv() and loop.sock_sendall() methods; the streams benchmark uses asyncio high-level streams, created by the asyncio.start_server() function; and the protocol benchmark uses loop.create_server() with a simple echo protocol. Read more about uvloop in a blog post about it.

Installation

uvloop requires Python 3.7 or greater and is available on PyPI. Use pip to install it:

$ pip install uvloop

Note that it is highly recommended to upgrade pip before installing uvloop with:

$ pip install -U pip

Using uvloop

Call uvloop.install() before calling asyncio.run() or manually creating an asyncio event loop:

import asyncio
import uvloop

async def main():
    # Main entry-point.
    ...

uvloop.install()
asyncio.run(main())

Building From Source

To build uvloop, you’ll need Python 3.7 or greater:

  1. Clone the repository:

    $ git clone --recursive git@github.com:MagicStack/uvloop.git
    $ cd uvloop
  2. Create a virtual environment and activate it:

    $ python3.7 -m venv uvloop-dev
    $ source uvloop-dev/bin/activate
  3. Install development dependencies:

    $ pip install -e .[dev]
  4. Build and run tests:

    $ make
    $ make test

License

uvloop is dual-licensed under MIT and Apache 2.0 licenses.

Metadata

Release files for uvloop 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uvloop 0.16.0
File Size Uploaded
uvloop-0.16.0.tar.gz 2.1 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for uvloop 0.16.0
File
uvloop-0.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
uvloop-0.16.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.12+ x86-64 Details
uvloop-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
uvloop-0.16.0-cp310-cp310-macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) Details
uvloop-0.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details
uvloop-0.16.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details
uvloop-0.16.0-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details
uvloop-0.16.0-cp39-cp39-macosx_10_9_universal2.whl CPython 3.9 CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) Details
uvloop-0.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ ARM64 Details
uvloop-0.16.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details
uvloop-0.16.0-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details
uvloop-0.16.0-cp38-cp38-macosx_10_9_universal2.whl CPython 3.8 CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) Details
uvloop-0.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64 Details
uvloop-0.16.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details
uvloop-0.16.0-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details

Total release size: 48.5 MB

Release files / uvloop-0.16.0.tar.gz

Download URL uvloop-0.16.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
f74bc20c7b67d1c27c72601c78cf95be99d5c2cdd4514502b4f3eb0933ff1228
BLAKE2b-256 checksum
How to use checksums
abd922bbffa8f8d7e075ccdb29e8134107adfb4710feb10039f9d357db8b589c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL uvloop-0.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.1 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
772206116b9b57cd625c8a88f2413df2fcfd0b496eb188b82a43bed7af2c2ec9
BLAKE2b-256 checksum
How to use checksums
121c4c270b22f68a75bedf795aadc40370c4ff9e910a5e1aff327c24aaae6a99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL uvloop-0.16.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 4.3 MB
Tags CPython 3.10 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
bd53f7f5db562f37cd64a3af5012df8cac2c464c97e732ed556800129505bd64
BLAKE2b-256 checksum
How to use checksums
b90014dffb56943092c2b5821d288dc23ff36dff9ad3b8aad3547c71b171cf3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl

Download URL uvloop-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
30ba9dcbd0965f5c812b7c2112a1ddf60cf904c1c160f398e7eed3a6b82dcd9c
BLAKE2b-256 checksum
How to use checksums
daea56fecce56844e308b6ff3c5b55a372a6a4da2c6fe8ee35a272459f534d9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp310-cp310-macosx_10_9_universal2.whl

Download URL uvloop-0.16.0-cp310-cp310-macosx_10_9_universal2.whl
Size 2.1 MB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
6224f1401025b748ffecb7a6e2652b17768f30b1a6a3f7b44660e5b5b690b12d
BLAKE2b-256 checksum
How to use checksums
2a0775074f9789d5f8811bc77230a84ddbb7586e555e84f59d75d2968ef5c4a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL uvloop-0.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.1 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
1e5f2e2ff51aefe6c19ee98af12b4ae61f5be456cd24396953244a30880ad861
BLAKE2b-256 checksum
How to use checksums
cbc898fa2d230835fe529e362301e5a852d0413e606ed790af9d96212086ace1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL uvloop-0.16.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 4.3 MB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
98d117332cc9e5ea8dfdc2b28b0a23f60370d02e1395f88f40d1effd2cb86c4f
BLAKE2b-256 checksum
How to use checksums
d5a4bf2554658b97ae17d0b0cc62a51b2425c4de9526a76638ab39dff12f1c05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp39-cp39-macosx_10_9_x86_64.whl

Download URL uvloop-0.16.0-cp39-cp39-macosx_10_9_x86_64.whl
Size 1.5 MB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
089b4834fd299d82d83a25e3335372f12117a7d38525217c2258e9b9f4578897
BLAKE2b-256 checksum
How to use checksums
bdccd682d7156873e080587ae1b749976ab674d490b3d43f03414707126a9a4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp39-cp39-macosx_10_9_universal2.whl

Download URL uvloop-0.16.0-cp39-cp39-macosx_10_9_universal2.whl
Size 2.1 MB
Tags CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
6ccd57ae8db17d677e9e06192e9c9ec4bd2066b77790f9aa7dede2cc4008ee8f
BLAKE2b-256 checksum
How to use checksums
a2222fba0652a03bac8c38201d5832aaba8d47e6e8dd4e2d05c9746571927ebb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL uvloop-0.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.6 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
8e0d26fa5875d43ddbb0d9d79a447d2ace4180d9e3239788208527c4784f7cab
BLAKE2b-256 checksum
How to use checksums
89bffcd4adf745fa35bd930c4af3e374ffac3a3d0d674992e8167abe21361316
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL uvloop-0.16.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 4.7 MB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
647e481940379eebd314c00440314c81ea547aa636056f554d491e40503c8464
BLAKE2b-256 checksum
How to use checksums
7d61e7003a75c758632e2e72f4dd76e7b3580e680a0fb764e1129515f3f143c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp38-cp38-macosx_10_9_x86_64.whl

Download URL uvloop-0.16.0-cp38-cp38-macosx_10_9_x86_64.whl
Size 1.5 MB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
bd8f42ea1ea8f4e84d265769089964ddda95eb2bb38b5cbe26712b0616c3edee
BLAKE2b-256 checksum
How to use checksums
745d8d43cca0ef537ebd4fda74519a8e3b61e799b7fa8ae938b1b23116fe3dd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp38-cp38-macosx_10_9_universal2.whl

Download URL uvloop-0.16.0-cp38-cp38-macosx_10_9_universal2.whl
Size 2.1 MB
Tags CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
e814ac2c6f9daf4c36eb8e85266859f42174a4ff0d71b99405ed559257750382
BLAKE2b-256 checksum
How to use checksums
30855d96af493078e85f5b268eaba4d9670afe45f28af2933b8cb463e0586f29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL uvloop-0.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.1 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
3a19828c4f15687675ea912cc28bbcb48e9bb907c801873bd1519b96b04fb805
BLAKE2b-256 checksum
How to use checksums
7e1668cfbc192b0189a950bd385288b3f566d1cc81615c4d3912623d28295fde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL uvloop-0.16.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 3.8 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
04ff57aa137230d8cc968f03481176041ae789308b4d5079118331ab01112450
BLAKE2b-256 checksum
How to use checksums
50382a0825302b207ff694cb501f7868330d004eeb6ee70470c52c00c2d4e6d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / uvloop-0.16.0-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL uvloop-0.16.0-cp37-cp37m-macosx_10_9_x86_64.whl
Size 1.5 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
b572256409f194521a9895aef274cea88731d14732343da3ecdb175228881638
BLAKE2b-256 checksum
How to use checksums
192787739cae95fea0ebcd65f1ea3d2925cb290582cb7fcd5d7456ee865a720a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.16.0 This release

16 release files

0.13.0

7 release files

0.10.2

7 release files

0.10.0

7 release files

0.9.1

7 release files

0.9.0

7 release files

0.8.1

7 release files

0.8.0

7 release files

0.7.2

7 release files

0.7.1

7 release files

0.7.0

4 release files

0.6.8

4 release files

0.6.7

4 release files

0.6.6

4 release files

0.6.5

4 release files

0.6.1

3 release files

0.6.0

4 release files

0.5.5

2 release files

0.5.4

4 release files

0.5.3

4 release files

0.5.2

4 release files

0.5.1

4 release files

0.5.0

4 release files

0.4.34

2 release files

0.4.31

2 release files

0.4.29

2 release files

0.4.28

2 release files

0.4.27

2 release files

0.4.26

2 release files

0.4.25

2 release files

0.4.24

2 release files

0.4.23

1 release file

0.4.22

1 release file

0.4.21

1 release file

0.4.20

1 release file

0.4.19

1 release file

0.4.18

1 release file

0.4.17

1 release file

0.4.16

1 release file

0.4.15

1 release file

0.4.14

1 release file

0.4.13

1 release file

0.4.12

1 release file

0.4.11

1 release file

0.4.10

1 release file

0.4.9

1 release file

0.4.8

1 release file

0.4.7

1 release file

0.4.6

1 release file

0.4.5

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page