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

Built distributions (wheels)

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

Total release size: 26.6 MB

Release files / uvloop-0.12.2.tar.gz

Download URL uvloop-0.12.2.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
c48692bf4587ce281d641087658eca275a5ad3b63c78297bbded96570ae9ce8f
BLAKE2b-256 checksum
How to use checksums
75997a470e4950d8ecb1b561e8483716c414cd51b8ee193de8eb23506275f5a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.2-cp37-cp37m-manylinux1_x86_64.whl

Download URL uvloop-0.12.2-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
459e4649fcd5ff719523de33964aa284898e55df62761e7773d088823ccbd3e0
BLAKE2b-256 checksum
How to use checksums
f7916acda7b0f1e33227a5ac7f161a19c2b9aeb1af0b8442c93d9d5aea66fb0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.2-cp37-cp37m-manylinux1_i686.whl

Download URL uvloop-0.12.2-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
0fcd894f6fc3226a962ee7ad895c4f52e3f5c3c55098e21efb17c071849a0573
BLAKE2b-256 checksum
How to use checksums
b5fdadb0cf1a10d769cbeec1c514e054b4d2af5e0056e5fae783b0cbfe3d30ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.2-cp37-cp37m-macosx_10_11_x86_64.whl

Download URL uvloop-0.12.2-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
b284c22d8938866318e3b9d178142b8be316c52d16fcfe1560685a686718a021
BLAKE2b-256 checksum
How to use checksums
07973b4489388068a47ad0366fa8d492c5a80c542572129fbc9e142e6b10027b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.2-cp36-cp36m-manylinux1_x86_64.whl

Download URL uvloop-0.12.2-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
2f31de1742c059c96cb76b91c5275b22b22b965c886ee1fced093fa27dde9e64
BLAKE2b-256 checksum
How to use checksums
e4d6ea6a9bdeb3effcd036443182e0967639852c798d78bd77b8394c0f7520ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.2-cp36-cp36m-manylinux1_i686.whl

Download URL uvloop-0.12.2-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
67867aafd6e0bc2c30a079603a85d83b94f23c5593b3cc08ec7e58ac18bf48e5
BLAKE2b-256 checksum
How to use checksums
5b92d2944a084cc1fce53363aead9c4731d663c3d1886fb4efdf20d9aadcbd34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.2-cp36-cp36m-macosx_10_11_x86_64.whl

Download URL uvloop-0.12.2-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
958906b9ca39eb158414fbb7d6b8ef1b7aee4db5c8e8e5d00fcbb69a1ce9dca7
BLAKE2b-256 checksum
How to use checksums
56f2265abff5dc4879acd3b08a0bc637c519fd4e04951a0297ff045128f4c529
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.2-cp35-cp35m-manylinux1_x86_64.whl

Download URL uvloop-0.12.2-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
fefc3b2b947c99737c348887db2c32e539160dcbeb7af9aa6b53db7a283538fe
BLAKE2b-256 checksum
How to use checksums
65e267ff25fcc9bd6cf21c72c3169c929a3662d678756755569e1b27650d83de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.2-cp35-cp35m-manylinux1_i686.whl

Download URL uvloop-0.12.2-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
8c200457e6847f28d8bb91c5e5039d301716f5f2fce25646f5fb3fd65eda4a26
BLAKE2b-256 checksum
How to use checksums
c1791114d1c2950cb73f02fe03d80ca40c3d461fd90eaee4b4d6e17224ffdf52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.2-cp35-cp35m-macosx_10_11_x86_64.whl

Download URL uvloop-0.12.2-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
ac1dca3d8f3ef52806059e81042ee397ac939e5a86c8a3cea55d6b087db66115
BLAKE2b-256 checksum
How to use checksums
5edfffee676f34a72bcb61b0da46f5e2444f6bf2048668a1258fa8a2f56a5054
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 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.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.12.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