Awesome Asyncio Overview
A curated list of awesome Python asyncio frameworks, libraries, software and resources
🏠 Home · 🔥 Feed · 📮 Subscribe · ❤️ Sponsor · 😺 timofurrer/awesome-asyncio · ⭐ 4.7K · 🏷️ Programming Languages
[!WARNING] This project is looking for a new home. I'm no longer maintaining it. Please let me know if you want to take over maintainance for it. Write me an email to [email protected]
Awesome asyncio 
A carefully curated list of awesome Python asyncio frameworks, libraries, software and resources.
The Python asyncio module introduced to the standard library with Python 3.4 provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives.
Asyncio is not really a brand-new technology however it appears to be very trending since a few years - especially in the Python community and with the release of Python 3.4 in March 2014. Thus, it's pretty hard to keep yourself up-to-date with the most awesome packages out there. Find some of those awesome packages here and if you are missing one we count on you to create an Issue or a Pull Request (⭐4.7k) with your suggestion.
Contents
- Web Frameworks
- Message Queues
- Database Drivers
- Networking
- GraphQL
- Testing
- Alternative Loops
- Misc
- Writings
- Talks
- Alternatives to asyncio
Web Frameworks
Libraries to build web applications.
- FastAPI (⭐82k) - A very high performance Python 3.6+ API framework based on type hints. Powered by Starlette and Pydantic.
- Django - An established, high-level Python web framework with a huge community and ecosystem.
- Starlette (⭐11k) - A lightweight ASGI framework/toolkit for building high performance services.
- aiohttp (⭐15k) - Http client/server for asyncio (PEP-3156).
- sanic (⭐18k) - Python 3.5+ web server that's written to go fast.
- Quart (⭐3.2k) - An asyncio web microframework with the same API as Flask.
- autobahn (⭐2.5k) - WebSocket and WAMP supporting asyncio and Twisted, for clients and servers.
- websockets (⭐5.3k) - A library for building WebSocket servers and clients in Python with a focus on correctness and simplicity.
- Tornado - Performant web framework and asynchronous networking library.
- uvicorn (⭐9k) - The lightning-fast ASGI server.
Message Queues
Libraries to implement applications using message queues.
- aioamqp (⭐280) - AMQP implementation using asyncio.
- pyzmq (⭐3.8k) - Python bindings for ZeroMQ.
- aiozmq (⭐425) - Alternative Asyncio integration with ZeroMQ.
- crossbar (⭐2k) - Crossbar.io is a networking platform for distributed and microservice applications.
- asyncio-nats (⭐966) - Client for the NATS messaging system.
- aiokafka (⭐1.2k) - Client for Apache Kafka.
Database Drivers
Libraries to connect to databases.
- asyncpg (⭐7.2k) - Fast PostgreSQL Database Client Library for Python/asyncio.
- asyncpgsa (⭐416) - Asyncpg with sqlalchemy core support.
- aiopg (⭐1.4k) - Library for accessing a PostgreSQL database.
- aiomysql (⭐1.8k) - Library for accessing a MySQL database
- aioodbc (⭐311) - Library for accessing a ODBC databases.
- motor (⭐2.5k) - The async Python driver for MongoDB.
- redis-py (⭐13k) - Redis Python Client (which includes aioreadis (⭐2.3k) now).
- aiocouchdb (⭐53) - CouchDB client built on top of aiohttp (asyncio).
- aioinflux (⭐160) - InfluxDB client built on top of aiohttp.
- aioes (⭐97) - Asyncio compatible driver for elasticsearch.
- peewee-async (⭐744) - ORM implementation based on peewee (⭐11k) and aiopg.
- GINO (⭐2.7k) - is a lightweight asynchronous Python ORM based on SQLAlchemy core, with asyncpg (⭐7.2k) dialect.
- Tortoise ORM (⭐4.9k) - native multi-backend ORM with Django-like API and easy relations management.
- Databases (⭐3.9k) - Async database access for SQLAlchemy core, with support for PostgreSQL, MySQL, and SQLite.
- Prisma Client Python (⭐2k) - An auto-generated, fully type safe ORM powered by Pydantic and tailored specifically for your schema - supports SQLite, PostgreSQL, MySQL, MongoDB, MariaDB and more.
- Piccolo (⭐1.5k) - An ORM / query builder which can work in async and sync modes, with a nice admin GUI, and ASGI middleware.
- Beanie - An async MongoDB ODM built on motor (⭐2.5k) and Pydantic.
Networking
Libraries to communicate in your network.
- AsyncSSH (⭐1.6k) - Provides an asynchronous client and server implementation of the SSHv2 protocol.
- aiodns (⭐547) - Simple DNS resolver for asyncio.
- aioping (⭐84) - Fast asyncio implementation of ICMP (ping) protocol.
- httpx (⭐14k) - asynchronous HTTP client for Python 3 with requests (⭐53k) compatible API.
GraphQL
Libraries to build GraphQL servers.
- Ariadne - Schema-first Python library for implementing GraphQL servers.
- Tartiflette - Schema-first Python 3.6+ GraphQL engine built on top of
libgraphqlparser
. - Strawberry - Code-first Python 3 GraphQL server with Django, Flask and FastAPI/Starlette support.
Testing
Libraries to test asyncio based applications.
- aiomock (⭐27) - A python mock library that supports async methods.
- asynctest (⭐309) - Enhance the standard unittest package with features for testing. asyncio libraries
- pytest-asyncio (⭐1.5k) - Pytest support for asyncio.
- aresponses (⭐104) - Asyncio http mocking. Similar to the responses (⭐4.2k) library used for requests (⭐53k).
- aioresponses (⭐533) - Helper for mock/fake web requests in Python aiohttp package.
Alternative Loops
Alternative asyncio loop implementations.
- uvloop (⭐11k) - Ultra fast implementation of asyncio event loop on top of libuv.
Misc
Other awesome asyncio libraries.
- aiochan (⭐169) - CSP-style concurrency with channels, select and multiprocessing on top of asyncio.
- aiocache (⭐1.2k) - Cache manager for different backends.
- aiofiles (⭐3k) - File support for asyncio.
- aiopath (⭐176) - Asynchronous
pathlib
for asyncio. - aiodebug (⭐62) - A tiny library for monitoring and testing asyncio programs.
- aiorun (⭐453) - A
run()
function that handles all the usual boilerplate for startup and graceful shutdown. - aiosc (⭐36) - Lightweight Open Sound Control implementation.
- aioserial (⭐136) - A drop-in replacement of pySerial (⭐3.3k).
- aiozipkin (⭐187) - Distributed tracing instrumentation for asyncio with zipkin
- asgiref (⭐1.5k) - Backend utils for ASGI to WSGI integration, includes sync_to_async and async_to_sync function wrappers.
- async_property (⭐90) - Python decorator for async properties.
- ruia (⭐1.8k) - An async web scraping micro-framework based on asyncio.
- kubernetes_asyncio (⭐382) - Asynchronous client library for Kubernetes.
- aiomisc (⭐390) - Miscellaneous utils for
asyncio
. - taskiq - Asynchronous distributed task manager (like celery, but async).
Writings
Documentation, blog posts, and other awesome writing about asyncio.
- Official asyncio documentation - Asynchronous I/O, event loop, coroutines and tasks.
- Short well-written intro to asyncio - Generators, Coroutines, Native Coroutines and async/await.
- AsyncIO for the Working Python Developer - A gentle introduction to asynchronous programming from basic examples working up to URL fetching.
- Test limits of Python aiohttp - Making 1 million requests with python-aiohttp.
- ASGI (Asynchronous Server Gateway Interface) - A spiritual successor to WSGI, intended to provide a standard interface between async-capable Python web servers, frameworks, and applications.
- First Principles Introduction to Asyncio - A no-buzzword first principles introduction to the internal workings of asyncio.
- Developing and Testing an Asynchronous API with FastAPI and Pytest - This tutorial looks at how to develop and test an asynchronous API with FastAPI using Test-Driven Development (TDD).
- Python Concurrency with asyncio - Learn how to speed up slow Python code with concurrent programming and the cutting-edge asyncio library.
Talks
Recordings of awesome talks about asyncio.
- Topics of Interest (Python Asyncio) | screencast | slides - PyCon Brasil 2015 keynote (David Beazley).
- Python Asynchronous I/O Walkthrough - 8-part code walkthrough (Philip Guo).
- Async/await in Python 3.5 and why it is awesome - EuroPython 2016 (Yury Selivanov).
- Fear and Awaiting in Async: A Savage Journey to the Heart of the Coroutine Dream | screencast - PyOhio 2016 keynote (David Beazley).
- Asynchronous Python for the Complete Beginner | slides - PyCon 2017 (Miguel Grinberg).
- Demystifying Python's Async and Await Keywords - JetBrains TV 2020 (Michael Kennedy)
Alternatives to asyncio
Alternative approaches to async programming in Python, some of which attempt to support some compatibility with asyncio
, others are not compatible at all.
- curio (⭐4.1k) - The coroutine concurrency library.
- Curio-Asyncio Bridge (⭐4.1k) - basic curio -> asyncio coroutine bridge.
- trio (⭐6.4k) - Pythonic async I/O for humans and snake people.
- trio-asyncio (⭐191) - re-implementation of the asyncio mainloop on top of Trio.
- AnyIO (⭐1.9k) - High level asynchronous concurrency and networking framework that works on top of either trio or asyncio.