Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.23.0 instead.

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

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

Built distributions (wheels)

Table of built distributions (wheels) for uvloop 0.15.1
File Actions
uvloop-0.15.1-cp39-cp39-manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details for uvloop-0.15.1-cp39-cp39-manylinux2014_aarch64.whl
uvloop-0.15.1-cp39-cp39-manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details for uvloop-0.15.1-cp39-cp39-manylinux2010_x86_64.whl
uvloop-0.15.1-cp39-cp39-macosx_10_14_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.14+ x86-64 Details for uvloop-0.15.1-cp39-cp39-macosx_10_14_x86_64.whl
uvloop-0.15.1-cp38-cp38-manylinux2014_aarch64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ ARM64 Details for uvloop-0.15.1-cp38-cp38-manylinux2014_aarch64.whl
uvloop-0.15.1-cp38-cp38-manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details for uvloop-0.15.1-cp38-cp38-manylinux2010_x86_64.whl
uvloop-0.15.1-cp38-cp38-macosx_10_14_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.14+ x86-64 Details for uvloop-0.15.1-cp38-cp38-macosx_10_14_x86_64.whl
uvloop-0.15.1-cp37-cp37m-manylinux2014_aarch64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64 Details for uvloop-0.15.1-cp37-cp37m-manylinux2014_aarch64.whl
uvloop-0.15.1-cp37-cp37m-manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details for uvloop-0.15.1-cp37-cp37m-manylinux2010_x86_64.whl
uvloop-0.15.1-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.1-cp37-cp37m-macosx_10_14_x86_64.whl

Total release size: 33.6 MB

Release files / uvloop-0.15.1.tar.gz

Download URL uvloop-0.15.1.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
7846828112bfb49abc5fdfc47d0e4dfd7402115c9fde3c14c31818cfbeeb63dc
BLAKE2b-256 checksum
How to use checksums
94989dc814f391b2293ecc790b9752e005296c69c3694fd9975b6cb77c448135
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.56.2 CPython/3.9.1

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

Download URL uvloop-0.15.1-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
1ae1ad731c8c0dcee80e0ecf06274f0f7293244d2cef81fa2747321a370a6aba
BLAKE2b-256 checksum
How to use checksums
e1739f916a5c2fa4a2ecace79c59ce056bb570179ddbbc53b351a1881d853175
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.56.2 CPython/3.9.1

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

Download URL uvloop-0.15.1-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
ca8a9e982f0bfbe331f41902cdd721c6e749e4685a403685e792b86a584f5969
BLAKE2b-256 checksum
How to use checksums
64c8fc83256cd6734efcd0dd7b64adbed6396a5483eba6b319e9a46893274f71
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.56.2 CPython/3.9.1

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

Download URL uvloop-0.15.1-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
236a3c31096e0845029856f7bc07a938340c2cdb35d9d39b38c9253b672bf948
BLAKE2b-256 checksum
How to use checksums
f462b74963676906c7b121ebc0c2f696abd0bab1fe906d61b059c2c4ca430c52
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.56.2 CPython/3.9.1

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

Download URL uvloop-0.15.1-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
ed073d24e0c383c24d17d3a2bb209b999ff0a8130e89b7c3f033db9e0c3bd04f
BLAKE2b-256 checksum
How to use checksums
5ab6e6be6d442c0eaf04a1664cd30d697e3a9b53485afa1f907ca1623a388a23
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.56.2 CPython/3.9.1

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

Download URL uvloop-0.15.1-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
e72779681f839b6a069d7e7a9f7962a1d1927612c5c2e33071415478bdc1b91b
BLAKE2b-256 checksum
How to use checksums
50c606a923e520e60b0432afa8d5851fbd1a2c0b5e5390443a8846bb5d833ba7
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.56.2 CPython/3.9.1

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

Download URL uvloop-0.15.1-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
66881fe8a2187334c4dd5010c56310bdf32fe426613f9ca727f090bc31280624
BLAKE2b-256 checksum
How to use checksums
28ca99ff96f06763bec9f98929d225a14277531227b0fe46d2494606007759f9
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.56.2 CPython/3.9.1

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

Download URL uvloop-0.15.1-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
47ec567151070ed770211d359ad9250b59368548c60212c7ef6dda3f5b1778f6
BLAKE2b-256 checksum
How to use checksums
227d6a2809bc3fe10d58ace4ffbe5c90e3fbb52523aa2775d50f2708c56ef925
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.56.2 CPython/3.9.1

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

Download URL uvloop-0.15.1-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
e178c255622d928d464187e3ceba94db88465f6b17909c651483fb73af8d8b85
BLAKE2b-256 checksum
How to use checksums
4ccc4703d9b6ca16c689e364aee51ef5dd45f907614f568f7d490d7ef9646ba1
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.56.2 CPython/3.9.1

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

Download URL uvloop-0.15.1-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
9541dc3f391941796ae95c9c3bb16b813acf9e3d4beebfd3b623f1acb22d318d
BLAKE2b-256 checksum
How to use checksums
e6ed8e893c65ba6d025221f63261154ca598feaf2daef02e5a69177a1d6dcdb0
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.56.2 CPython/3.9.1

Security for uvloop 0.15.1

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