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.15.2

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.15.2
File Size Uploaded Provenance Actions
uvloop-0.15.2.tar.gz 2.1 MB Without provenance Details for uvloop-0.15.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for uvloop 0.15.2
File Actions
uvloop-0.15.2-cp39-cp39-manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details for uvloop-0.15.2-cp39-cp39-manylinux2014_aarch64.whl
uvloop-0.15.2-cp39-cp39-manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details for uvloop-0.15.2-cp39-cp39-manylinux2010_x86_64.whl
uvloop-0.15.2-cp39-cp39-macosx_10_14_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.14+ x86-64 Details for uvloop-0.15.2-cp39-cp39-macosx_10_14_x86_64.whl
uvloop-0.15.2-cp38-cp38-manylinux2014_aarch64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ ARM64 Details for uvloop-0.15.2-cp38-cp38-manylinux2014_aarch64.whl
uvloop-0.15.2-cp38-cp38-manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details for uvloop-0.15.2-cp38-cp38-manylinux2010_x86_64.whl
uvloop-0.15.2-cp38-cp38-macosx_10_14_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.14+ x86-64 Details for uvloop-0.15.2-cp38-cp38-macosx_10_14_x86_64.whl
uvloop-0.15.2-cp37-cp37m-manylinux2014_aarch64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64 Details for uvloop-0.15.2-cp37-cp37m-manylinux2014_aarch64.whl
uvloop-0.15.2-cp37-cp37m-manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details for uvloop-0.15.2-cp37-cp37m-manylinux2010_x86_64.whl
uvloop-0.15.2-cp37-cp37m-macosx_10_14_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 Details for uvloop-0.15.2-cp37-cp37m-macosx_10_14_x86_64.whl

Total release size: 33.6 MB

Release files / uvloop-0.15.2.tar.gz

Download URL uvloop-0.15.2.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
2bb0624a8a70834e54dde8feed62ed63b50bad7a1265c40d6403a2ac447bce01
BLAKE2b-256 checksum
How to use checksums
446e0cb292e4e6ee1382e2ede458f90c94b4f990b261f738403ac45cb8183bc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / uvloop-0.15.2-cp39-cp39-manylinux2014_aarch64.whl

Download URL uvloop-0.15.2-cp39-cp39-manylinux2014_aarch64.whl
Size 4.8 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
6de130d0cb78985a5d080e323b86c5ecaf3af82f4890492c05981707852f983c
BLAKE2b-256 checksum
How to use checksums
833a356170beaacd4c24781266bdbabc52da88ae6433e7a0b659271df66a8d15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / uvloop-0.15.2-cp39-cp39-manylinux2010_x86_64.whl

Download URL uvloop-0.15.2-cp39-cp39-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
44cac8575bf168601424302045234d74e3561fbdbac39b2b54cc1d1d00b70760
BLAKE2b-256 checksum
How to use checksums
a51f92dd5dd1d396785e09fa39f6c20392be37b43dae000ac51a0c0ced8f471f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / uvloop-0.15.2-cp39-cp39-macosx_10_14_x86_64.whl

Download URL uvloop-0.15.2-cp39-cp39-macosx_10_14_x86_64.whl
Size 1.5 MB
Tags CPython 3.9 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
114543c84e95df1b4ff546e6e3a27521580466a30127f12172a3278172ad68bc
BLAKE2b-256 checksum
How to use checksums
86e77294f30954d38f5567ec6cf349df234c18f207df94a250e47c8f66b4a6db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / uvloop-0.15.2-cp38-cp38-manylinux2014_aarch64.whl

Download URL uvloop-0.15.2-cp38-cp38-manylinux2014_aarch64.whl
Size 5.2 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
b45218c99795803fb8bdbc9435ff7f54e3a591b44cd4c121b02fa83affb61c7c
BLAKE2b-256 checksum
How to use checksums
7f7cc8193e59f6021c87eb8d51606e1c164fd42d29cacfe2abc40e08c968d3e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / uvloop-0.15.2-cp38-cp38-manylinux2010_x86_64.whl

Download URL uvloop-0.15.2-cp38-cp38-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
7ae39b11a5f4cec1432d706c21ecc62f9e04d116883178b09671aa29c46f7a47
BLAKE2b-256 checksum
How to use checksums
ed016f5cd7e246d09f7d184406d69d02c3c059cfe559f923ab0617498382e66b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / uvloop-0.15.2-cp38-cp38-macosx_10_14_x86_64.whl

Download URL uvloop-0.15.2-cp38-cp38-macosx_10_14_x86_64.whl
Size 1.5 MB
Tags CPython 3.8 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
90e56f17755e41b425ad19a08c41dc358fa7bf1226c0f8e54d4d02d556f7af7c
BLAKE2b-256 checksum
How to use checksums
03e194fc3d54e61eef1a802dbeb88a444203b26a84a7f21ceb4f76ce2a5f180c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / uvloop-0.15.2-cp37-cp37m-manylinux2014_aarch64.whl

Download URL uvloop-0.15.2-cp37-cp37m-manylinux2014_aarch64.whl
Size 4.3 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
42eda9f525a208fbc4f7cecd00fa15c57cc57646c76632b3ba2fe005004f051d
BLAKE2b-256 checksum
How to use checksums
e1a398cf41d86529cec17c56730267f75f2b01789fe9fd4a68ce009a0cd407d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / uvloop-0.15.2-cp37-cp37m-manylinux2010_x86_64.whl

Download URL uvloop-0.15.2-cp37-cp37m-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
e5e5f855c9bf483ee6cd1eb9a179b740de80cb0ae2988e3fa22309b78e2ea0e7
BLAKE2b-256 checksum
How to use checksums
8705805df4850d9659efd69d00076269ae6adcb0e151d1922cff822ead2c432a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Release files / uvloop-0.15.2-cp37-cp37m-macosx_10_14_x86_64.whl

Download URL uvloop-0.15.2-cp37-cp37m-macosx_10_14_x86_64.whl
Size 1.5 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
19fa1d56c91341318ac5d417e7b61c56e9a41183946cc70c411341173de02c69
BLAKE2b-256 checksum
How to use checksums
111a354cde59fc6733b370b912b913ab054c5bd8bbf9bf3f1ad69b22a84f7121
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

Security for uvloop 0.15.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.15.2 This release

10 release files No provenance

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