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.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.12.0
File Size Uploaded Provenance Actions
uvloop-0.12.0.tar.gz 1.9 MB Without provenance Details for uvloop-0.12.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for uvloop 0.12.0
File Actions
uvloop-0.12.0-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details for uvloop-0.12.0-cp37-cp37m-manylinux1_x86_64.whl
uvloop-0.12.0-cp37-cp37m-manylinux1_i686.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-32 Details for uvloop-0.12.0-cp37-cp37m-manylinux1_i686.whl
uvloop-0.12.0-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.0-cp37-cp37m-macosx_10_11_x86_64.whl
uvloop-0.12.0-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details for uvloop-0.12.0-cp36-cp36m-manylinux1_x86_64.whl
uvloop-0.12.0-cp36-cp36m-manylinux1_i686.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32 Details for uvloop-0.12.0-cp36-cp36m-manylinux1_i686.whl
uvloop-0.12.0-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.0-cp36-cp36m-macosx_10_11_x86_64.whl
uvloop-0.12.0-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details for uvloop-0.12.0-cp35-cp35m-manylinux1_x86_64.whl
uvloop-0.12.0-cp35-cp35m-manylinux1_i686.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32 Details for uvloop-0.12.0-cp35-cp35m-manylinux1_i686.whl
uvloop-0.12.0-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.0-cp35-cp35m-macosx_10_11_x86_64.whl

Total release size: 26.6 MB

Release files / uvloop-0.12.0.tar.gz

Download URL uvloop-0.12.0.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
afdf34bf507090e4c7f5108a17240982760356b8aae4edd37180ec4f94c36cbb
BLAKE2b-256 checksum
How to use checksums
f05acf8cb64bdc694462ef1ee9a925302dac40b29a52ab0eede4bab7fc0e0f2b
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

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

Download URL uvloop-0.12.0-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
7639188ff4466d86cfd4418cd784d1198a8cc913279fb8798a4b12a4d42ad341
BLAKE2b-256 checksum
How to use checksums
1da9dc86e8dedba5adf4cef3da63544f7fd6d42a3f86534268ef2f8cab89ac5c
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

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

Download URL uvloop-0.12.0-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
0ff2e67b693f7d2007466952dbe312075098e8f15364fda27d16e8a7f266d74d
BLAKE2b-256 checksum
How to use checksums
0e9b0d9e6834d8d4b46a81409da3f6d486c2e503f0faed5f332a7a44759a6d38
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

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

Download URL uvloop-0.12.0-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
32dcc003e1973f3db303494f5f63db11091c86a146053773d81ac5484b10c416
BLAKE2b-256 checksum
How to use checksums
0cc2aab87be7c315379b13284e63ac74462a51caee8a3a4f871d80557f5c0555
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

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

Download URL uvloop-0.12.0-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
a73649cd043f5d3e3ae471667c790a7ee2295b22fac7bedcae8705158f8ba111
BLAKE2b-256 checksum
How to use checksums
6a9dd43c40083179e8f9c62b7f92c855add4aa73ad9c042173f424a5ee427492
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

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

Download URL uvloop-0.12.0-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
ec521d14ddcdd9f8d0075d7d1f82e9d8806f7f0a047d2e5bc737e9eddf7f930d
BLAKE2b-256 checksum
How to use checksums
975165a787c8f5d32b3cf6286015f7c9c04d912481c892dc5b5ef6403d38f54f
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

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

Download URL uvloop-0.12.0-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
bd7a6db5dbfae0c93e27cb200bb2b9513e21a90a2d4a259b39a9b5446c4d5aa3
BLAKE2b-256 checksum
How to use checksums
4e6d2e19b6aa8ffab9f342783ed0c9497b47d74b61640d6619dd4a75134cb2d6
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

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

Download URL uvloop-0.12.0-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
cc27e903da274f76826848832f62e1ec410a43602e1e0cd4f8db8c619b1ee93e
BLAKE2b-256 checksum
How to use checksums
cea165e7a26fff1215f527cdd48c3c49a936e46ce5ab0feaa60be12e45799884
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

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

Download URL uvloop-0.12.0-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
4301871418f967d0b13409f1bd10ecc7825a7f183282dcc9e19d08532e6cb2e9
BLAKE2b-256 checksum
How to use checksums
576a45e564ff14b268f2be5ac00fda5ae37ebce3577f7aad23976bf62d03ae61
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

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

Download URL uvloop-0.12.0-cp35-cp35m-macosx_10_11_x86_64.whl
Size 1.4 MB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.11+ x86-64
SHA-256 checksum
How to use checksums
2d0029314dc87312ff8d46c3724363d847e5235403eced5d3f98da80a87f4828
BLAKE2b-256 checksum
How to use checksums
e43c69119782f2fae59687e4cf47529cb93dd74d73e391922c123fcce0ef981a
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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.6

Security for uvloop 0.12.0

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