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

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

Built distributions (wheels)

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

Total release size: 24.3 MB

Release files / uvloop-0.14.0rc1.tar.gz

Download URL uvloop-0.14.0rc1.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
182617c2992a79b268bfd193691c4aacb93634e9d8d96edf560a842a6206411d
BLAKE2b-256 checksum
How to use checksums
d7ed144f7f12815548b663307c29136d78724165900cece125076d2ff73195ac
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.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

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

Download URL uvloop-0.14.0rc1-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
9ab030794432c47b78199d3f268ac2c898ae85fb9f09e10ae03dd7af62904b0e
BLAKE2b-256 checksum
How to use checksums
8303fe31ace5ba9e289d2a73dd266ab9de8f0b9b4a24284ec37fd97f0328b4c8
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.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

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

Download URL uvloop-0.14.0rc1-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
469e0e3b80f245ed32f054174e6a69e6a01715dbbb24eb917733fe5af09ad306
BLAKE2b-256 checksum
How to use checksums
f8505ad38e32945aee4e6d8145747e0b158de48e23cfb10565978dedd820ab36
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.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

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

Download URL uvloop-0.14.0rc1-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
682fa2ab24a758831f531dca122f128373c3dd95a3c8885b5fd1c48775d0024f
BLAKE2b-256 checksum
How to use checksums
ad85839a201730e39f76ee036fea79b81ade5929835e2ce9951f838727f77050
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.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

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

Download URL uvloop-0.14.0rc1-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
c1d55b6926d956a29cf5d7cc891004602ea7cd006b0b80354b9b3d973ca9027f
BLAKE2b-256 checksum
How to use checksums
08aebc1f57356ec76ef4b6620fbcc21751efb108bc8fa25cd4244ddd77a85d75
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.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

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

Download URL uvloop-0.14.0rc1-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
9967fd537f3164607d153900aaae036e9a18015d8478f84406ba58b183f5abfc
BLAKE2b-256 checksum
How to use checksums
97f432d2f9b3eaff3c2c1888f05417341722311e3cd1a884a57fd97267f20a86
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.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

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

Download URL uvloop-0.14.0rc1-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
448b13a1adfc47745b880b5d5b34c975c7851b1cd3b0eafe2569b2250190c797
BLAKE2b-256 checksum
How to use checksums
cafc7d4a4c9609829a1e908146346371f622106b914d6c5cdc9794649c8f65b9
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.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

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

Download URL uvloop-0.14.0rc1-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
32d2fe6ee6be28a99661e1f02bf6cedb99711df1065a3fb7ba7dd73ccb85f768
BLAKE2b-256 checksum
How to use checksums
a45f5ead827a9b3155172b30fdb8184abd559925a1d0699d161cc7bdbb051038
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.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

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

Download URL uvloop-0.14.0rc1-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
2a0268553d2920108b05250c9711060313851daa60b1052c38b6520320aa50b1
BLAKE2b-256 checksum
How to use checksums
b7ff9d8e7276408f10ce05406ff36ca97372a4fa2c26d4a686d6040a27ddc557
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.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

Security for uvloop 0.14.0rc1

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