All Projects → MagicStack → Uvloop

MagicStack / Uvloop

Licence: other
Ultra fast asyncio event loop.

Programming Languages

python
139335 projects - #7 most used programming language
cython
566 projects

Projects that are alternatives of or similar to Uvloop

Asyncio
asyncio historical repository
Stars: ✭ 952 (-88.46%)
Mutual labels:  asyncio, async-await, networking, high-performance
Cppcoro
A library of C++ coroutine abstractions for the coroutines TS
Stars: ✭ 2,118 (-74.31%)
Mutual labels:  async, asyncio, async-await
Aiormq
Pure python AMQP 0.9.1 asynchronous client library
Stars: ✭ 112 (-98.64%)
Mutual labels:  async, asyncio, async-await
Trio
Trio – a friendly Python library for async concurrency and I/O
Stars: ✭ 4,404 (-46.59%)
Mutual labels:  async, async-await, networking
Sqlalchemy aio
Asyncio strategy for SQLAlchemy.
Stars: ✭ 299 (-96.37%)
Mutual labels:  async, asyncio, async-await
Asyncpg
A fast PostgreSQL Database Client Library for Python/asyncio.
Stars: ✭ 5,216 (-36.75%)
Mutual labels:  asyncio, high-performance, async-python
Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (-91.63%)
Mutual labels:  async, async-await
Arq
Fast job queuing and RPC in python with asyncio and redis.
Stars: ✭ 695 (-91.57%)
Mutual labels:  async, asyncio
Swift Nio
Event-driven network application framework for high performance protocol servers & clients, non-blocking.
Stars: ✭ 6,777 (-17.81%)
Mutual labels:  networking, high-performance
Fennel
A task queue library for Python and Redis
Stars: ✭ 24 (-99.71%)
Mutual labels:  async, asyncio
Tornado Celery
Non-blocking Celery client for Tornado
Stars: ✭ 561 (-93.2%)
Mutual labels:  async, asyncio
Async Reduce
Reducer for similar simultaneously coroutines
Stars: ✭ 17 (-99.79%)
Mutual labels:  asyncio, async-await
Async
An awesome asynchronous event-driven reactor for Ruby.
Stars: ✭ 1,000 (-87.87%)
Mutual labels:  async, asyncio
P Map
Map over promises concurrently
Stars: ✭ 639 (-92.25%)
Mutual labels:  async, async-await
Aredis
redis client for Python asyncio (has support for redis server, sentinel and cluster)
Stars: ✭ 576 (-93.01%)
Mutual labels:  async, asyncio
Fastapi Users
Ready-to-use and customizable users management for FastAPI
Stars: ✭ 713 (-91.35%)
Mutual labels:  async, asyncio
Chillout
Reduce CPU usage by non-blocking async loop and psychologically speed up in JavaScript
Stars: ✭ 565 (-93.15%)
Mutual labels:  async, async-await
Then
🎬 Tame async code with battle-tested promises
Stars: ✭ 908 (-88.99%)
Mutual labels:  async, async-await
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+380.09%)
Mutual labels:  async, asyncio
May
rust stackful coroutine library
Stars: ✭ 909 (-88.98%)
Mutual labels:  async, high-performance
https://img.shields.io/github/workflow/status/MagicStack/uvloop/Tests 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.

https://raw.githubusercontent.com/MagicStack/uvloop/master/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.7 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.7 or greater:

  1. Clone the repository:

    $ git clone --recursive [email protected]: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 -e .[dev]
    
  4. Build and run tests:

    $ make
    $ make test
    

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].