Skip to main content
https://travis-ci.org/MagicStack/uvloop.svg?branch=master 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.

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.5 or greater and is available on PyPI. Use pip to install it:

$ pip install uvloop

Using uvloop

To make asyncio use uvloop, you can install the uvloop event loop policy:

import asyncio
import uvloop

asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())

or, starting with uvloop 0.12:

import uvloop

uvloop.install()

Building From Source

To build uvloop, you’ll need Python 3.5 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 -r requirements.dev.txt
  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.12.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.12.1
File Size Uploaded Provenance Actions
uvloop-0.12.1.tar.gz 1.9 MB Without provenance Details for uvloop-0.12.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for uvloop 0.12.1
File Actions
uvloop-0.12.1-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details for uvloop-0.12.1-cp37-cp37m-manylinux1_x86_64.whl
uvloop-0.12.1-cp37-cp37m-manylinux1_i686.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-32 Details for uvloop-0.12.1-cp37-cp37m-manylinux1_i686.whl
uvloop-0.12.1-cp37-cp37m-macosx_10_11_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.11+ x86-64 Details for uvloop-0.12.1-cp37-cp37m-macosx_10_11_x86_64.whl
uvloop-0.12.1-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details for uvloop-0.12.1-cp36-cp36m-manylinux1_x86_64.whl
uvloop-0.12.1-cp36-cp36m-manylinux1_i686.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32 Details for uvloop-0.12.1-cp36-cp36m-manylinux1_i686.whl
uvloop-0.12.1-cp36-cp36m-macosx_10_11_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.11+ x86-64 Details for uvloop-0.12.1-cp36-cp36m-macosx_10_11_x86_64.whl
uvloop-0.12.1-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details for uvloop-0.12.1-cp35-cp35m-manylinux1_x86_64.whl
uvloop-0.12.1-cp35-cp35m-manylinux1_i686.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32 Details for uvloop-0.12.1-cp35-cp35m-manylinux1_i686.whl
uvloop-0.12.1-cp35-cp35m-macosx_10_11_x86_64.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.11+ x86-64 Details for uvloop-0.12.1-cp35-cp35m-macosx_10_11_x86_64.whl

Total release size: 26.6 MB

Release files / uvloop-0.12.1.tar.gz

Download URL uvloop-0.12.1.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
198fe0c196056930ec6c4a0a878e531a66d15467ca7c74a875aa90271f0c6e3f
BLAKE2b-256 checksum
How to use checksums
ec7496f1fdd6936d7a5ea2fa20bbd54b2c2242b1e92df425b37d00737982f2d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release files / uvloop-0.12.1-cp37-cp37m-manylinux1_x86_64.whl

Download URL uvloop-0.12.1-cp37-cp37m-manylinux1_x86_64.whl
Size 3.5 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b296493e033846e46488a6aa227a75c790091f5ee5456ec637bb0badad1e8851
BLAKE2b-256 checksum
How to use checksums
a8c388f82e2077a0af726e250bd2a1a62c12fecacb400a5011df09b9cbdc8e02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release files / uvloop-0.12.1-cp37-cp37m-manylinux1_i686.whl

Download URL uvloop-0.12.1-cp37-cp37m-manylinux1_i686.whl
Size 3.3 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
3fd4943570d20e8cd4d9f0a3190ebd5cf040e5610b685e05c878128a11f7ad14
BLAKE2b-256 checksum
How to use checksums
f325e450a94f74ca6685b12102b5766704aad94eb6acdeecea5cc229ad775255
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release files / uvloop-0.12.1-cp37-cp37m-macosx_10_11_x86_64.whl

Download URL uvloop-0.12.1-cp37-cp37m-macosx_10_11_x86_64.whl
Size 1.5 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.11+ x86-64
SHA-256 checksum
How to use checksums
1c175f47d34b84e33c0e312f4987c927ea004afc3a5f05d2f0f610d71d0e4c89
BLAKE2b-256 checksum
How to use checksums
2bbabc6ee6ffe5ad5fd712d0ac58e3845955349792ed565cb4a1c7fd2718d35d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release files / uvloop-0.12.1-cp36-cp36m-manylinux1_x86_64.whl

Download URL uvloop-0.12.1-cp36-cp36m-manylinux1_x86_64.whl
Size 3.5 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
1c47f197be8f0a3c651dd20be1e1bd43268186246f246d4e86c91e95a89e4865
BLAKE2b-256 checksum
How to use checksums
952404de220360c0082e3dc37fdd08d31a3db3e026f0d9fe05cff49df147991a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release files / uvloop-0.12.1-cp36-cp36m-manylinux1_i686.whl

Download URL uvloop-0.12.1-cp36-cp36m-manylinux1_i686.whl
Size 3.3 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
da5a59d8812188b57b5783c7fb78891d14dd1050b6259680e0dbd4253d7d0f64
BLAKE2b-256 checksum
How to use checksums
a2f2f27c10262409538d496762fc0f245c71eea91f05f865c556961837332598
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release files / uvloop-0.12.1-cp36-cp36m-macosx_10_11_x86_64.whl

Download URL uvloop-0.12.1-cp36-cp36m-macosx_10_11_x86_64.whl
Size 1.5 MB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.11+ x86-64
SHA-256 checksum
How to use checksums
435e232869923fd2248e4ca0ad73e24a5b4debf40bed9dcde133cfe1bef98a7a
BLAKE2b-256 checksum
How to use checksums
4037e19f72d869cf3b1675cefd984199b00e400f9a7cba36f0a2a1cdc6b963e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release files / uvloop-0.12.1-cp35-cp35m-manylinux1_x86_64.whl

Download URL uvloop-0.12.1-cp35-cp35m-manylinux1_x86_64.whl
Size 3.5 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
9cfdb966ae804c46b96c92207dfd2174935ffc70e706e42e1c94c60d16dbe860
BLAKE2b-256 checksum
How to use checksums
188c07d51a5f40fb8e308f64068570319221f0cca64007f029a76a12624d5ff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release files / uvloop-0.12.1-cp35-cp35m-manylinux1_i686.whl

Download URL uvloop-0.12.1-cp35-cp35m-manylinux1_i686.whl
Size 3.2 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
a585781443eeb2edb858f8c08c503aac237a5f1bebf0c84ea8340cc337afa408
BLAKE2b-256 checksum
How to use checksums
576dfeb2adedb1452a84aaf0ed14951f3aeb5b3ccd7d3811c9e9175964fe6a6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release files / uvloop-0.12.1-cp35-cp35m-macosx_10_11_x86_64.whl

Download URL uvloop-0.12.1-cp35-cp35m-macosx_10_11_x86_64.whl
Size 1.5 MB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.11+ x86-64
SHA-256 checksum
How to use checksums
c684047c6cf6d697ba37872fb1b4489012ea91f3f802c8fbb9c367c4902e88dc
BLAKE2b-256 checksum
How to use checksums
02ab4f37ac2c912ad1412d1902b13ad59d18a4439d32ba44b11d4ad6234ff430
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Security for uvloop 0.12.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.12.1 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