Skip to main content
https://travis-ci.org/MagicStack/uvloop.svg?branch=master https://img.shields.io/pypi/v/uvloop.svg

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

Installation

uvloop requires Python 3.5 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())

Alternatively, you can create an instance of the loop manually, using:

loop = uvloop.new_event_loop()
asyncio.set_event_loop(loop)

Development of uvloop

To build uvloop, you’ll need Cython and Python 3.5. The best way is to create a virtual env, so that you’ll have cython and python commands pointing to the correct tools.

  1. git clone --recursive git@github.com:MagicStack/uvloop.git

  2. cd uvloop

  3. make

  4. make test

License

uvloop is dual-licensed under MIT and Apache 2.0 licenses.

Metadata

Release files for uvloop 0.7.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.7.1
File Size Uploaded Provenance Actions
uvloop-0.7.1.tar.gz 1.7 MB Without provenance Details for uvloop-0.7.1.tar.gz

Built distributions (wheels)

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

Total release size: 15.5 MB

Release files / uvloop-0.7.1.tar.gz

Download URL uvloop-0.7.1.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
e606cc9de2036430e5c502a58e265a7788134096803349ff0c537ec65044ef12
BLAKE2b-256 checksum
How to use checksums
0314addd76b562029236adfbf150f38af1296549892f89acb4168f40c361c1e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL uvloop-0.7.1-cp36-cp36m-manylinux1_x86_64.whl
Size 3.0 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
2916cf697d9b1100a2629c3e0e114958ed7b35421b1d697573a8c40a2db29908
BLAKE2b-256 checksum
How to use checksums
c106e4ee3824cfac9e679aec489c412fd9e26e7c10568784bfa80a156278e4a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL uvloop-0.7.1-cp36-cp36m-manylinux1_i686.whl
Size 2.8 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
d41076b6cd65b5776152868e984f5f4f6362199fea713a579cf787c394a301ab
BLAKE2b-256 checksum
How to use checksums
96887afd36a857f7eec91c511c76715b68dc1e2c5885e91d08fc5b982d14d211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL uvloop-0.7.1-cp36-cp36m-macosx_10_11_x86_64.whl
Size 1.2 MB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.11+ x86-64
SHA-256 checksum
How to use checksums
82e9d879db79b94b0d00bd73f90e29c43b480d509718d129eb31e2a3dc9e103c
BLAKE2b-256 checksum
How to use checksums
8ab6f1d78e43cc3cd7426f93accbfd28bd2832da1327e91b307a7bf2b89c94ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL uvloop-0.7.1-cp35-cp35m-manylinux1_x86_64.whl
Size 2.9 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
666377fbc5c41b5ec1c972648fad259a023dd81a141a132b4fb0e029b62caee5
BLAKE2b-256 checksum
How to use checksums
f3cac7cbfa6d622683b75f2193ed79ca1fb75ac866b974ac308c9a5ae9423218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL uvloop-0.7.1-cp35-cp35m-manylinux1_i686.whl
Size 2.7 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
2a5181f304d742b3a9d3f32f0aec4c109e88233cd9ad88dc2fb337010b750391
BLAKE2b-256 checksum
How to use checksums
6b7ccd635574b06418283fef1c3c4e969d359456d3d207f69a18e4aebed5ff0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL uvloop-0.7.1-cp35-cp35m-macosx_10_11_x86_64.whl
Size 1.2 MB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.11+ x86-64
SHA-256 checksum
How to use checksums
0a37768784c6f88a56efd13352dce546e63913d99200bd7ef6fa46cb22747a01
BLAKE2b-256 checksum
How to use checksums
c91c49d99d7d285a17d3c5a286a3619c28f217fdf03232b712dd39592bafbad0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for uvloop 0.7.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.7.1 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