Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

Note that it is highly recommended to upgrade pip before installing uvloop with:

$ pip install -U pip

Using uvloop

Call uvloop.install() before calling asyncio.run() or manually creating an asyncio event loop:

import asyncio
import uvloop

async def main():
    # Main entry-point.
    ...

uvloop.install()
asyncio.run(main())

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.14.0rc2

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.14.0rc2
File Size Uploaded Provenance Actions
uvloop-0.14.0rc2.tar.gz 2.0 MB Without provenance Details for uvloop-0.14.0rc2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for uvloop 0.14.0rc2
File Actions
uvloop-0.14.0rc2-cp38-cp38-manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details for uvloop-0.14.0rc2-cp38-cp38-manylinux2010_x86_64.whl
uvloop-0.14.0rc2-cp38-cp38-macosx_10_11_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.11+ x86-64 Details for uvloop-0.14.0rc2-cp38-cp38-macosx_10_11_x86_64.whl
uvloop-0.14.0rc2-cp37-cp37m-manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details for uvloop-0.14.0rc2-cp37-cp37m-manylinux2010_x86_64.whl
uvloop-0.14.0rc2-cp37-cp37m-macosx_10_11_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.11+ x86-64 Details for uvloop-0.14.0rc2-cp37-cp37m-macosx_10_11_x86_64.whl
uvloop-0.14.0rc2-cp36-cp36m-manylinux2010_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 Details for uvloop-0.14.0rc2-cp36-cp36m-manylinux2010_x86_64.whl
uvloop-0.14.0rc2-cp36-cp36m-macosx_10_11_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.11+ x86-64 Details for uvloop-0.14.0rc2-cp36-cp36m-macosx_10_11_x86_64.whl
uvloop-0.14.0rc2-cp35-cp35m-manylinux2010_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64 Details for uvloop-0.14.0rc2-cp35-cp35m-manylinux2010_x86_64.whl
uvloop-0.14.0rc2-cp35-cp35m-macosx_10_11_x86_64.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.11+ x86-64 Details for uvloop-0.14.0rc2-cp35-cp35m-macosx_10_11_x86_64.whl

Total release size: 24.2 MB

Release files / uvloop-0.14.0rc2.tar.gz

Download URL uvloop-0.14.0rc2.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
7d557bf49991e3f2b70298b117fc09791eba0115af2198a5a385eab85c776130
BLAKE2b-256 checksum
How to use checksums
39acfcd82cfe51b6fd399297365cb181e5524c8484bd44ef1013da454fed91a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Release files / uvloop-0.14.0rc2-cp38-cp38-manylinux2010_x86_64.whl

Download URL uvloop-0.14.0rc2-cp38-cp38-manylinux2010_x86_64.whl
Size 4.7 MB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
667463aa2a2f6ed0a51a631f204a1ae9c71c8e49e2d8d82b3b9bf32833a7de83
BLAKE2b-256 checksum
How to use checksums
cd313a6176aa5f0faccb35f5f45be0d3f7af3612fb37915a9280158a050f9bab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Release files / uvloop-0.14.0rc2-cp38-cp38-macosx_10_11_x86_64.whl

Download URL uvloop-0.14.0rc2-cp38-cp38-macosx_10_11_x86_64.whl
Size 1.5 MB
Tags CPython 3.8 macOS 10.11+ x86-64
SHA-256 checksum
How to use checksums
b5c5a51b09ef6e787faadb5bcbd88d117c5136a162c40629a0d98707ae05dc6b
BLAKE2b-256 checksum
How to use checksums
16d878c57edacb310e5c1d71eddbe39a3e1e6fb28e82fcbfafa1b3ea0230ed1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Release files / uvloop-0.14.0rc2-cp37-cp37m-manylinux2010_x86_64.whl

Download URL uvloop-0.14.0rc2-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
61b898682e3dc3673216f1c6678013d8f758304013d897f56d8bdc1d4ffe04e3
BLAKE2b-256 checksum
How to use checksums
e52472dde545df727df4cc09f81246b6e29687d61c02b6a3da6a6a3ced74bc37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Release files / uvloop-0.14.0rc2-cp37-cp37m-macosx_10_11_x86_64.whl

Download URL uvloop-0.14.0rc2-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
117357af2b79d9183675adace1e1e1b3400be81fdd54cdc8feb6a54724f099ca
BLAKE2b-256 checksum
How to use checksums
e568d128b443cedb4e02cddde2f5a37fae9c7c697e7b2a9910354d4ee11065d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Release files / uvloop-0.14.0rc2-cp36-cp36m-manylinux2010_x86_64.whl

Download URL uvloop-0.14.0rc2-cp36-cp36m-manylinux2010_x86_64.whl
Size 3.9 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
c0f69bc2e750b5370010c48c9825c6785487d60fa26025df6206f33b5027fc56
BLAKE2b-256 checksum
How to use checksums
886894a6b344c23830f61bbe61e5bb6a8fabd32b3eda90436ddcc795fd2b67a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Release files / uvloop-0.14.0rc2-cp36-cp36m-macosx_10_11_x86_64.whl

Download URL uvloop-0.14.0rc2-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
aa10c0246425d8e7f494c639473427a35831222af5a2b0cb59eab251715a0d09
BLAKE2b-256 checksum
How to use checksums
f952896d43cefe4be4a493572a09b7ab5801dbad1bd97c62a001c9f81a6792f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Release files / uvloop-0.14.0rc2-cp35-cp35m-manylinux2010_x86_64.whl

Download URL uvloop-0.14.0rc2-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
2cffc419a627bc71285d9481c869228a84f56358e54b1f683bc1d4be19b66651
BLAKE2b-256 checksum
How to use checksums
b19870052ee69074046e59661017fd1d41c98f68981ecee17adb4bc91fccb645
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Release files / uvloop-0.14.0rc2-cp35-cp35m-macosx_10_11_x86_64.whl

Download URL uvloop-0.14.0rc2-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
426074b9f5ee5865fcf0818252c16e72446e97578349d8b58ae3a666dacd8e38
BLAKE2b-256 checksum
How to use checksums
97016613eb5f71637aa20db15d66e82577fc0e81a3f5508750c38ad5cd6e6e7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Security for uvloop 0.14.0rc2

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