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 with your suggestion.
- Web Frameworks
- Message Queues
- Database Drivers
- Networking
- GraphQL
- Testing
- Alternative Loops
- Misc
- Writings
- Talks
- Alternatives to asyncio
Libraries to build web applications.
- aiohttp - Asynchronous HTTP client/server framework for asyncio and Python | 16k+
- autobahn - WebSocket and WAMP in Python for Twisted and asyncio | 2k+
- FastAPI - FastAPI framework, high performance, easy to learn, fast to code, ready for production | 93k+
- Quart - An async Python micro framework for building web applications. | 3k+
- sanic - Accelerate your web app development | Build fast. Run fast. | 18k+
- Starlette - The little ASGI framework that shines. 🌟 | 11k+
- Tornado - Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. | 22k+
- Twisted - Event-driven networking engine written in Python. | 5k+
- uvicorn - An ASGI web server, for Python. 🦄 | 10k+
- websockets - Library for building WebSocket servers and clients in Python | 5k+
Libraries to implement applications using message queues.
- aioamqp - AMQP implementation using asyncio | 1k-
- aiokafka - asyncio client for kafka | 1k+
- aiozmq - Asyncio (pep 3156) integration with ZeroMQ | 1k-
- asyncio-nats - Python3 client for NATS | 1k+
- crossbar - Crossbar.io - WAMP application router | 2k+
- pyzmq - PyZMQ: Python bindings for zeromq | 4k+
Libraries to connect to databases.
- aiocouchdb - CouchDB client built on top of aiohttp (asyncio) | 1k-
- aioes - asyncio compatible driver for elasticsearch | 1k-
- aioinflux - Asynchronous Python client for InfluxDB | 1k-
- aiomysql - aiomysql is a library for accessing a MySQL database from the asyncio | 1k+
- aioodbc - aioodbc - is a library for accessing a ODBC databases from the asyncio | 1k-
- aiopg - Library for accessing a PostgreSQL database.
- asyncpg - A fast PostgreSQL Database Client Library for Python/asyncio. | 7k+
- asyncpgsa - A wrapper around asyncpg for use with sqlalchemy | 1k-
- Beanie - An async MongoDB ODM built on pymongo and Pydantic.
- Databases - Async database support for Python. 🗄 | 4k+
- GINO - GINO Is Not ORM - a Python asyncio ORM on SQLAlchemy core. | 2k+
- peewee-async - Asynchronous interface for peewee ORM powered by asyncio | 1k-
- Piccolo - A fast, user friendly ORM and query builder which supports asyncio. | 1k+
- Prisma Client Python - Prisma Client Python is an auto-generated and fully type-safe database client designed for ease of use | 2k+
- pymongo - PyMongo - the Official MongoDB Python driver | 4k+
- redis-py - Redis Python client | 13k+
- Tortoise ORM - Familiar asyncio ORM for python, built with relations in mind | 5k+
Libraries to communicate in your network.
- aiodns - Simple DNS resolver for asyncio | 1k-
- aioping - Python asyncio ping library | 1k-
- AsyncSSH - AsyncSSH is a Python package which provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework. | 1k+
- httpx - A next generation HTTP client for Python. 🦋 | 14k+
Libraries to build GraphQL servers.
- Ariadne - Schema-first Python library for implementing GraphQL servers.
- Strawberry - Code-first Python 3 GraphQL server with Django, Flask and FastAPI/Starlette support.
- Tartiflette - Schema-first Python 3.6+ GraphQL engine built on top of
libgraphqlparser.
Libraries to test asyncio based applications.
- aiomock - A python mock library that supports async methods.
- aioresponses - Aioresponses is a helper for mock/fake web requests in python aiohttp package. | 1k-
- aresponses - Asyncio http mocking. Similar to the responses library used for 'requests' | 1k-
- asynctest - Enhance the standard unittest package with features for testing. asyncio libraries
- pytest-asyncio - Asyncio support for pytest | 1k+
Alternative asyncio loop implementations.
- uvloop - Ultra fast asyncio event loop. | 11k+
Other awesome asyncio libraries.
- aiocache - Asyncio cache manager for redis, memcached and memory | 1k+
- aiochan - CSP-style concurrency for Python | 1k-
- aiodebug - A tiny library for monitoring and testing asyncio programs | 1k-
- aiofiles - File support for asyncio.
- aiomisc - aiomisc - miscellaneous utils for asyncio | 1k-
- aiopath - 📁 Asynchronous pathlib for Python | 1k-
- aiorun - A "run" function for asyncio-based apps that does all the boilerplate. | 1k-
- aiosc - Lightweight Open Sound Control implementation for Python using asyncio | 1k-
- aioserial - pyserial-asyncio for humans. | 1k-
- aiozipkin - Distributed tracing instrumentation for asyncio with zipkin | 1k-
- asgiref - ASGI specification and utilities | 1k+
- async_property - Python decorator for async properties. | 1k-
- kubernetes_asyncio - Python asynchronous client library for Kubernetes http://kubernetes.io/ | 1k-
- ruia - Async Python 3.6+ web scraping micro-framework based on asyncio | 1k+
- taskiq - Asynchronous distributed task manager (like celery, but async).
Documentation, blog posts, and other awesome writing about asyncio.
- 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.
- AsyncIO for the Working Python Developer - A gentle introduction to asynchronous programming from basic examples working up to URL fetching.
- 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).
- First Principles Introduction to Asyncio - A no-buzzword first principles introduction to the internal workings of asyncio.
- Official asyncio documentation - Asynchronous I/O, event loop, coroutines and tasks.
- Python Concurrency with asyncio - Learn how to speed up slow Python code with concurrent programming and the cutting-edge asyncio library.
- Short well-written intro to asyncio - Generators, Coroutines, Native Coroutines and async/await.
- Test limits of Python aiohttp - Making 1 million requests with python-aiohttp.
Recordings of awesome talks about asyncio.
- Async/await in Python 3.5 and why it is awesome - EuroPython 2016 (Yury Selivanov).
- Asynchronous Python for the Complete Beginner | slides - PyCon 2017 (Miguel Grinberg).
- Demystifying Python's Async and Await Keywords - JetBrains TV 2020 (Michael Kennedy)
- Fear and Awaiting in Async: A Savage Journey to the Heart of the Coroutine Dream | screencast - PyOhio 2016 keynote (David Beazley).
- Python Asynchronous I/O Walkthrough - 8-part code walkthrough (Philip Guo).
- Topics of Interest (Python Asyncio) | screencast | slides - PyCon Brasil 2015 keynote (David Beazley).
Alternative approaches to async programming in Python, some of which attempt to support some compatibility with asyncio, others are not compatible at all.
- AnyIO - High level asynchronous concurrency and networking framework that works on top of either Trio or asyncio | 2k+
- curio - Good Curio! | 4k+
- trio - Trio – a friendly Python library for async concurrency and I/O | 7k+
- Curio-Asyncio Bridge - basic curio -> asyncio coroutine bridge. | 1k-
- trio-asyncio - a re-implementation of the asyncio mainloop on top of Trio | 1k-