Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

ThirdParty

Andrew Svetlov edited this page May 11, 2015 · 57 revisions

See also asyncio.org (asyncio resources) and Trollius (port of asyncio to Python 2).

Libraries

  • aiofiles: File support for asyncio
  • aiorwlock: Read write lock for asyncio
  • aioutils: Python3 Asyncio Utils, Group (like gevent.pool.Group), Pool (like gevent.pool.Pool), Bag and OrderedBag
  • tasklocals: Task-local variables
  • pytest-asyncio: Pytest support for asyncio

Protocols implementations

Clients

  • AMQP: aioamqp: AMQP implementation using asyncio (Used by RabbitMQ)
  • AMI: panoramisk, a library to play with Asterisk's protocols: AMI and FastAGI
  • CouchDB: aiocouchdb, CouchDB client
  • DNS: aiodns: Async DNS resolver
  • ElasticSearch: aioes: ElasticSearch client library
  • Etcd: aioetcd: Coroutine-based etcd client
  • HTTP: aiohttp.requests: http client with Requests-like API.
  • IRC:
    • irc3, plugable irc client library based on python's asyncio
    • bottom, asyncio-based rfc2812-compliant IRC Client
  • memcached: aiomemcache, minimal memcached client
  • MongoDB: asyncio-mongo, MongoDB driver (ported from Twisted)
  • MySQL: aiomysql, MySQL driver
  • PostgreSQL: aiopg, PostgreSQL client library built on top of psycopg2
  • Redis:
  • SSH: AsyncSSH: SSH client and server implementation
  • WebSockets: aiohttp.ws_connect: WebSockets client
  • XMPP (Jabber): slixmpp, SleekXMPP (XMPP Library) fork using asyncio, for poezio

Servers

  • FastAGI: panoramisk, a library to play with Asterisk's protocols: AMI and FastAGI
  • IRC: irc3d, irc server library based on irc3
  • HTTP: aiohttp: http client and server infrastructure for asyncio
  • SSH: AsyncSSH: SSH client and server implementation

Web Frameworks

For classical HTTP/1.1 protocol

Looking for WSGI? Read this thread: WSGI implementation compatible with asyncio?.

  • aiohttp.web: a Flask-like API to build quickly HTTP applications, made by the creators of aiohttp.
  • aiopyramid: Tools for running pyramid using asyncio.
  • aiowsgi: minimalist wsgi server using asyncio
  • interest: event-driven web framework on top of aiohttp/asyncio.
  • muffin: A web framework based on Asyncio stack (early alpha)
  • nacho: web framework
  • Pulsar: Event driven concurrent framework for python. With pulsar you can write asynchronous servers performing one or several activities in different threads and/or processes.
  • rainfall: another web framework
  • Vase: web framework

For WebSockets

ORMs

  • aiopg.sa: support for SQLAlchemy functional SQL layer, based on aiopg
  • peewee: peewee-async, library providing asynchronous interface powered by asyncio for peewee ORM.

Integration with other applications

  • API-Hour: Transform easily your AsyncIO server source code (HTTP, SSH, ...) to be multiprocess: it will help to improve the efficency on multi-CPU servers.
  • Gunicorn: Gunicorn has gaiohttp worker built on top of aiohttp library

Applications built with AsyncIO

  • ktcal2: SSH brute forcer tool and library, using AsyncIO of Python 3.4

Run asyncio on top of

  • eventlet: aiogreen, asyncio API implemented on top of eventlet
  • gevent: aiogevent, asyncio API implemented on top of gevent

Adapters for other event loops

Some people have already written adapters for integrating asyncio with other async I/O frameworks.

Misc

  • aiocron: Crontabs for asyncio
  • aiomas: A library for multi-agent systems and RPC based on asyncio
  • aiotest: test suite to validate an implementation of the asyncio API
  • aioprocessing: A Python 3.3+ library that integrates the multiprocessing module with asyncio
  • blender-asyncio: Asyncio Bridge for Blender Python API
  • ipython-yf: An ipython extension to make it asyncio compatible
  • aiogearman: asyncio gearman support. Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work.
  • Serial port using the serial module, see using serial port in python3 asyncio at Stackoverflow, serial.Serial can be registered with loop.add_reader().

Filesystem

asyncio does not support asynchronous operations on the filesystem. Even if files are opened with O_NONBLOCK, read and write will block.

Read asynchronous disk I/O (October 2012 by arvid).

The Linux kernel provides asynchronous operations on the filesystem (aio), but it requires a library and it doesn't scale with many concurrent operations. See aio.

The GNU C library (glibc) implements the POSIX aio interface, but it is implemented with threads. See aio(7) manual page.

Recent discussion on the Linux Kernel: Non-blocking buffered file read operations (September 2014).

For now, the workaround is to use aiofiles that uses threads to handle files.

Clone this wiki locally