Skip to main content

Fast implementation of asyncio event loop on top of libuv

Project description

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 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())

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, for example:

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uvloop-0.11.1.tar.gz (1.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

uvloop-0.11.1-cp37-cp37m-manylinux1_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.7m

uvloop-0.11.1-cp37-cp37m-manylinux1_i686.whl (3.5 MB view details)

Uploaded CPython 3.7m

uvloop-0.11.1-cp37-cp37m-macosx_10_11_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.7mmacOS 10.11+ x86-64

uvloop-0.11.1-cp36-cp36m-manylinux1_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.6m

uvloop-0.11.1-cp36-cp36m-manylinux1_i686.whl (3.5 MB view details)

Uploaded CPython 3.6m

uvloop-0.11.1-cp36-cp36m-macosx_10_11_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.6mmacOS 10.11+ x86-64

uvloop-0.11.1-cp35-cp35m-manylinux1_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.5m

uvloop-0.11.1-cp35-cp35m-manylinux1_i686.whl (3.4 MB view details)

Uploaded CPython 3.5m

uvloop-0.11.1-cp35-cp35m-macosx_10_11_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.5mmacOS 10.11+ x86-64

File details

Details for the file uvloop-0.11.1.tar.gz.

File metadata

  • Download URL: uvloop-0.11.1.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1.tar.gz
Algorithm Hash digest
SHA256 54be0ce6213e5488fd2332ae52f4ff20800aaf9bfe3d08f3422bc71a035903c8
MD5 52387dee0f00baf5ad7aa88a416acb1a
BLAKE2b-256 c78739c3a2a91c2079fa43f3a49fe3423eacc4c4ab2247a8419a80f2a2626cde

See more details on using hashes here.

File details

Details for the file uvloop-0.11.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: uvloop-0.11.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 82e31d2382d724c59f85452ebe3ac4966bafe218e13499b480bb1c0f50d578a0
MD5 4fdec3ae4203a59c096d95434fd413ba
BLAKE2b-256 923f5392e00dbf1111cc03f4c2b4c982db10afc1b28e1a3e2465787b32be8120

See more details on using hashes here.

File details

Details for the file uvloop-0.11.1-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: uvloop-0.11.1-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 8a647b8b752b8a0d62479062444b9f0d638764be09cd6ad96c03e724623d67a0
MD5 f63e94af22550f79311c8ab1608b44c5
BLAKE2b-256 5ae298fc9134181f6abb3a70221b3f981ab5d6186a05d3d95079481917d20504

See more details on using hashes here.

File details

Details for the file uvloop-0.11.1-cp37-cp37m-macosx_10_11_x86_64.whl.

File metadata

  • Download URL: uvloop-0.11.1-cp37-cp37m-macosx_10_11_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.7m, macOS 10.11+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 1694b955ee95dbee3202bcc201acf68b0945ae90eb2cdc4ec89a6e7ceb540edd
MD5 764ba7909fdf68f1fee55a9276da1459
BLAKE2b-256 ed712f21c29be81853a5d09f016605e4d357ab7f0100fced37ca6c16429e52d8

See more details on using hashes here.

File details

Details for the file uvloop-0.11.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: uvloop-0.11.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1f99956512dbffa05e6dba3d2729bfa2ac6616d60dc7942ed8574f1cfe0180d4
MD5 776a8b6f8541638a2b45bf696bcffbab
BLAKE2b-256 27314dbfaa44b5e9622708e16d33f6fd23359ac06a50ebbca425fb4a300f6048

See more details on using hashes here.

File details

Details for the file uvloop-0.11.1-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: uvloop-0.11.1-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 c9404e9e142d05b4925e30c42cf6441b048df7b92f2e735cdd2d326d15eb65d6
MD5 22ff8b9e18051fd8c2f119e648d2eecb
BLAKE2b-256 41b21ce8d63c6675cc9b2b226fc58778608cc8f495959ddb344025ee224fcaee

See more details on using hashes here.

File details

Details for the file uvloop-0.11.1-cp36-cp36m-macosx_10_11_x86_64.whl.

File metadata

  • Download URL: uvloop-0.11.1-cp36-cp36m-macosx_10_11_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.6m, macOS 10.11+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 0fd2c05bae3c354daa20671c07e2f1418f04c180c1a9c85f6a5ec918f90f3b14
MD5 52d53a98ca976775f284f80be60cac5a
BLAKE2b-256 ec729ef40be2f5557ec1f3c357aba0de922071fc553bf89e17f6c912932b1134

See more details on using hashes here.

File details

Details for the file uvloop-0.11.1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: uvloop-0.11.1-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 83db488b2d8998ab0381e13dc072aa9f703c6a8f0ec90acec9bded8be337da20
MD5 7336ec961dd1408cde88ee2b15250004
BLAKE2b-256 441dd44b70b1e3083542ae5c93b1b375f725e80a705541fae8a49061cd730397

See more details on using hashes here.

File details

Details for the file uvloop-0.11.1-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: uvloop-0.11.1-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 0fc2ffda735f528a2bf55d356dd28ea3e7833ed9a4c38c318b62aa951be60705
MD5 b57d3899804cd258c964ea2e3978c463
BLAKE2b-256 9e71e04d5bc448d7becf3892204a6f5e50aab18a9f599a1ab7f5b643f8d3ab8e

See more details on using hashes here.

File details

Details for the file uvloop-0.11.1-cp35-cp35m-macosx_10_11_x86_64.whl.

File metadata

  • Download URL: uvloop-0.11.1-cp35-cp35m-macosx_10_11_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.5m, macOS 10.11+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for uvloop-0.11.1-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 f306551ef7bb2083277fba0d4d8f1e8f65047c4388f4cd8581ce65de99832539
MD5 5888246a7085e129d6bac299bb92c9c9
BLAKE2b-256 341d467b7690510e16e76d44db56a0d8902c02d87f67663a9d12df038c8180d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page