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.13.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.13.0
File Size Uploaded Provenance Actions
uvloop-0.13.0.tar.gz 2.0 MB Without provenance Details for uvloop-0.13.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for uvloop 0.13.0
File Actions
uvloop-0.13.0-cp37-cp37m-manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details for uvloop-0.13.0-cp37-cp37m-manylinux2010_x86_64.whl
uvloop-0.13.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.13.0-cp37-cp37m-macosx_10_11_x86_64.whl
uvloop-0.13.0-cp36-cp36m-manylinux2010_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 Details for uvloop-0.13.0-cp36-cp36m-manylinux2010_x86_64.whl
uvloop-0.13.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.13.0-cp36-cp36m-macosx_10_11_x86_64.whl
uvloop-0.13.0-cp35-cp35m-manylinux2010_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64 Details for uvloop-0.13.0-cp35-cp35m-manylinux2010_x86_64.whl
uvloop-0.13.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.13.0-cp35-cp35m-macosx_10_11_x86_64.whl

Total release size: 17.9 MB

Release files / uvloop-0.13.0.tar.gz

Download URL uvloop-0.13.0.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
942cd07035510b149d6160796f4e972137130ae953871b6a98c2cf5d5ab68c2e
BLAKE2b-256 checksum
How to use checksums
e315dc3276384f4363015d7c72282f37066bae26c77f99158f66c9058ac167cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.5.6

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

Download URL uvloop-0.13.0-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
e698a20a3b4ccb380d207f9d491d4085d7c38d364f6a0bae98684a1612a9607a
BLAKE2b-256 checksum
How to use checksums
bb2783c42973ae0a27340c32170fa261f1692319371df1fb3bf054a00dd52d7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.5.6

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

Download URL uvloop-0.13.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
155b34d513655e753d07f499a7e811970e2d397f240dfcbec0b32a9587159c99
BLAKE2b-256 checksum
How to use checksums
1498b17a324ee8dd177be90cc47267838e428e9ac7e0db7f81364b6b27ce0f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.5.6

Release files / uvloop-0.13.0-cp36-cp36m-manylinux2010_x86_64.whl

Download URL uvloop-0.13.0-cp36-cp36m-manylinux2010_x86_64.whl
Size 3.8 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
0deb6c97c5807c792dd9024bab90e6ca49e981862103cb2ea37b430c1ca0a267
BLAKE2b-256 checksum
How to use checksums
043d7225a411742e6e7583f630525b140bb4eab2d3731453f22096c5e75f5b59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.5.6

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

Download URL uvloop-0.13.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
c63b6c0bf33144c604dd72f7eecf2d3a3ac7405c503c67bd98128cf306efe18a
BLAKE2b-256 checksum
How to use checksums
858ebe499add791bd48ce153b315f9e0ce3d03c785bdf4cc664af8092adaeb29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.5.6

Release files / uvloop-0.13.0-cp35-cp35m-manylinux2010_x86_64.whl

Download URL uvloop-0.13.0-cp35-cp35m-manylinux2010_x86_64.whl
Size 3.8 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
1df3ddfa280206e9999ae1c777a20836eb895bcec6dc9fae2cbb6eecfafb099e
BLAKE2b-256 checksum
How to use checksums
2e4c1971070b3fa83df7872e2b6dd1033e6c637bd38d4b6fc3b7892b2ecfb3f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.5.6

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

Download URL uvloop-0.13.0-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
5b19361c8767e1dc61f6367f948d4f3dc5504b9f2eba488641b3d26ec14498ba
BLAKE2b-256 checksum
How to use checksums
c8a516f0937914a3aa43ab93867677fa9f8c4309566338bb27f11b7f76f06e9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.5.6

Security for uvloop 0.13.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.13.0 This release

7 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