[[
wikihub
]]
Search
⌘K
Explore
People
For Agents
Sign in
Explore
People
For Agents
Sign in
@harrisonqian / Awesome / wiki/programming-languages/asyncio.md
Suggest edit
Cancel
Submit suggestion
Title
Name
Note
--- visibility: public --- # Asyncio **repo:** [timofurrer/awesome-asyncio](https://github.com/timofurrer/awesome-asyncio) **category:** [[programming-languages|Programming Languages]] **related:** [[python|Python]] --- > [!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 timo@furrer.life # Awesome asyncio [](https://github.com/sindresorhus/awesome) > A carefully curated list of awesome Python asyncio frameworks, libraries, software and resources. The Python [asyncio](https://docs.python.org/3/library/asyncio.html) 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](https://github.com/timofurrer/awesome-asyncio/blob/master/CONTRIBUTING.md) with your suggestion. ## Contents * [Web Frameworks](#web-frameworks) * [Message Queues](#message-queues) * [Database Drivers](#[database](/@harrisonqian/awesome/wiki/databases/database)-drivers) * [Networking](#networking) * [GraphQL](#graphql) * [Testing](#testing) * [Alternative Loops](#alternative-loops) * [Misc](#misc) * [Writings](#writings) * [Talks](#talks) * [Alternatives to asyncio](#alternatives-to-asyncio) *** ## Web Frameworks *Libraries to build web applications.* * [FastAPI](https://github.com/tiangolo/fastapi) - A very high performance [Python](/@harrisonqian/awesome/wiki/programming-languages/python) 3.6+ API framework based on type hints. Powered by Starlette and Pydantic. * [Django](https://www.djangoproject.com/) - An established, high-level [Python](/@harrisonqian/awesome/wiki/programming-languages/python) web framework with a huge community and ecosystem. * [Starlette](https://github.com/encode/starlette) - A lightweight ASGI framework/toolkit for building high performance services. * [aiohttp](https://github.com/KeepSafe/aiohttp) - Http client/server for asyncio (PEP-3156). * [sanic](https://github.com/channelcat/sanic) - [Python](/@harrisonqian/awesome/wiki/programming-languages/python) 3.5+ web server that's written to go fast. * [Quart](https://github.com/pallets/quart) - An asyncio web microframework with the same API as [Flask](/@harrisonqian/awesome/wiki/back-end-development/flask). * [autobahn](https://github.com/crossbario/autobahn-python) - WebSocket and WAMP supporting asyncio and Twisted, for clients and servers. * [websockets](https://github.com/aaugustin/websockets/) - A library for building WebSocket servers and clients in [Python](/@harrisonqian/awesome/wiki/programming-languages/python) with a focus on correctness and simplicity. * [Tornado](http://www.tornadoweb.org/en/stable/) - Performant web framework and asynchronous networking library. * [uvicorn](https://github.com/encode/uvicorn) - The lightning-fast ASGI server. ## Message Queues *Libraries to implement applications using message queues.* * [aioamqp](https://github.com/Polyconseil/aioamqp) - AMQP implementation using asyncio. * [pyzmq](https://github.com/zeromq/pyzmq) - [Python](/@harrisonqian/awesome/wiki/programming-languages/python) bindings for ZeroMQ. * [aiozmq](https://github.com/aio-libs/aiozmq) - Alternative Asyncio [integration](/@harrisonqian/awesome/wiki/platforms/integration) with ZeroMQ. * [crossbar](https://github.com/crossbario/crossbar) - Crossbar.io is a networking platform for distributed and microservice applications. * [asyncio-nats](https://github.com/nats-io/asyncio-nats) - Client for the NATS messaging system. * [aiokafka](https://github.com/aio-libs/aiokafka) - Client for Apache Kafka. ## Database Drivers *Libraries to connect to databases.* * [asyncpg](https://github.com/MagicStack/asyncpg) - Fast [PostgreSQL](/@harrisonqian/awesome/wiki/databases/postgresql) [Database](/@harrisonqian/awesome/wiki/databases/database) Client Library for [Python](/@harrisonqian/awesome/wiki/programming-languages/python)/asyncio. * [asyncpgsa](https://github.com/CanopyTax/asyncpgsa) - Asyncpg with [sqlalchemy](/@harrisonqian/awesome/wiki/databases/sqlalchemy) [core](/@harrisonqian/awesome/wiki/platforms/core) support. * [aiopg](https://github.com/aio-libs/aiopg/) - Library for accessing a [PostgreSQL](/@harrisonqian/awesome/wiki/databases/postgresql) [database](/@harrisonqian/awesome/wiki/databases/database). * [aiomysql](https://github.com/aio-libs/aiomysql) - Library for accessing a [MySQL](/@harrisonqian/awesome/wiki/databases/mysql) [database](/@harrisonqian/awesome/wiki/databases/database) * [aioodbc](https://github.com/aio-libs/aioodbc) - Library for accessing a ODBC databases. * [pymongo](https://github.com/mongodb/mongo-[python](/@harrisonqian/awesome/wiki/programming-languages/python)-driver) - The Official [MongoDB](/@harrisonqian/awesome/wiki/databases/mongodb) Python driver, offering both synchronous and asynchronous APIs. * [redis-py](https://github.com/redis/redis-py) - Redis [Python](/@harrisonqian/awesome/wiki/programming-languages/python) Client (which includes [aioreadis](https://github.com/aio-libs/aioredis) now). * [aiocouchdb](https://github.com/aio-libs/aiocouchdb) - [CouchDB](/@harrisonqian/awesome/wiki/databases/couchdb) client built on top of aiohttp (asyncio). * [aioinflux](https://github.com/plugaai/aioinflux) - [InfluxDB](/@harrisonqian/awesome/wiki/databases/influxdb) client built on top of aiohttp. * [aioes](https://github.com/aio-libs/aioes) - Asyncio compatible driver for elasticsearch. * [peewee-async](https://github.com/05bit/peewee-async) - ORM implementation based on [peewee](https://github.com/coleifer/peewee) and aiopg. * [GINO](https://github.com/fantix/gino) - is a lightweight asynchronous [Python](/@harrisonqian/awesome/wiki/programming-languages/python) ORM based on [SQLAlchemy](https://www.[sqlalchemy](/@harrisonqian/awesome/wiki/databases/sqlalchemy).org/) [core](/@harrisonqian/awesome/wiki/platforms/core), with [asyncpg](https://github.com/MagicStack/asyncpg) dialect. * [Tortoise ORM](https://github.com/tortoise/tortoise-orm) - native multi-backend ORM with Django-like API and easy relations management. * [Databases](https://github.com/encode/databases) - Async [database](/@harrisonqian/awesome/wiki/databases/database) access for [SQLAlchemy](/@harrisonqian/awesome/wiki/databases/sqlalchemy) [core](/@harrisonqian/awesome/wiki/platforms/core), with support for [PostgreSQL](/@harrisonqian/awesome/wiki/databases/postgresql), [MySQL](/@harrisonqian/awesome/wiki/databases/mysql), and SQLite. * [Prisma Client Python](https://github.com/RobertCraigie/prisma-client-py) - An auto-generated, fully type safe ORM powered by Pydantic and tailored specifically for your schema - supports SQLite, [PostgreSQL](/@harrisonqian/awesome/wiki/databases/postgresql), [MySQL](/@harrisonqian/awesome/wiki/databases/mysql), [MongoDB](/@harrisonqian/awesome/wiki/databases/mongodb), MariaDB and more. * [Piccolo](https://github.com/piccolo-orm/piccolo) - An ORM / query builder which can work in async and sync modes, with a nice admin GUI, and ASGI middleware. * [Beanie](https://beanie-odm.dev) - An async [MongoDB](/@harrisonqian/awesome/wiki/databases/mongodb) ODM built on [pymongo](https://github.com/mongodb/mongo-[python](/@harrisonqian/awesome/wiki/programming-languages/python)-driver) and [Pydantic](https://pydantic-docs.helpmanual.io). ## Networking *Libraries to communicate in your network.* * [AsyncSSH](https://github.com/ronf/asyncssh) - Provides an asynchronous client and server implementation of the SSHv2 protocol. * [aiodns](https://github.com/saghul/aiodns) - Simple DNS resolver for asyncio. * [aioping](https://github.com/stellarbit/aioping) - Fast asyncio implementation of ICMP (ping) protocol. * [httpx](https://github.com/encode/httpx) - asynchronous HTTP client for [Python](/@harrisonqian/awesome/wiki/programming-languages/python) 3 with [requests](https://github.com/psf/requests) compatible API. ## GraphQL *Libraries to build GraphQL servers.* * [Ariadne](https://ariadnegraphql.org) - Schema-first [Python](/@harrisonqian/awesome/wiki/programming-languages/python) library for implementing [GraphQL](/@harrisonqian/awesome/wiki/miscellaneous/graphql) servers. * [Tartiflette](https://tartiflette.io/) - Schema-first [Python](/@harrisonqian/awesome/wiki/programming-languages/python) 3.6+ [GraphQL](/@harrisonqian/awesome/wiki/miscellaneous/graphql) engine built on top of `libgraphqlparser`. * [Strawberry](https://strawberry.rocks) - Code-first [Python](/@harrisonqian/awesome/wiki/programming-languages/python) 3 [GraphQL](/@harrisonqian/awesome/wiki/miscellaneous/graphql) server with Django, [Flask](/@harrisonqian/awesome/wiki/back-end-development/flask) and [FastAPI](/@harrisonqian/awesome/wiki/back-end-development/fastapi)/Starlette support. ## Testing *Libraries to test asyncio based applications.* * [aiomock](https://github.com/nhumrich/aiomock/) - A [python](/@harrisonqian/awesome/wiki/programming-languages/python) mock library that supports async methods. * [asynctest](https://github.com/Martiusweb/asynctest/) - Enhance the standard unittest package with features for [testing](/@harrisonqian/awesome/wiki/testing/testing). asyncio libraries * [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) - Pytest support for asyncio. * [aresponses](https://github.com/CircleUp/aresponses) - Asyncio http mocking. Similar to the [responses](https://github.com/getsentry/responses) library used for [requests](https://github.com/requests/requests). * [aioresponses](https://github.com/pnuckowski/aioresponses) - Helper for mock/fake web requests in [Python](/@harrisonqian/awesome/wiki/programming-languages/python) aiohttp package. ## Alternative Loops *Alternative asyncio loop implementations.* * [uvloop](https://github.com/MagicStack/uvloop) - Ultra fast implementation of asyncio event loop on top of libuv. ## Misc *Other awesome asyncio libraries.* * [aiochan](https://github.com/zh217/aiochan) - CSP-style concurrency with channels, select and multiprocessing on top of asyncio. * [aiocache](https://github.com/argaen/aiocache) - Cache manager for different backends. * [aiofiles](https://github.com/Tinche/aiofiles/) - File support for asyncio. * [aiopath](https://github.com/alexdelorenzo/aiopath) - Asynchronous `pathlib` for asyncio. * [aiodebug](https://github.com/qntln/aiodebug) - A tiny library for monitoring and [testing](/@harrisonqian/awesome/wiki/testing/testing) asyncio programs. * [aiorun](https://github.com/cjrh/aiorun) - A `run()` function that handles all the usual boilerplate for startup and graceful shutdown. * [aiosc](https://github.com/artfwo/aiosc) - Lightweight Open Sound Control implementation. * [aioserial](https://github.com/changyuheng/aioserial) - A drop-in replacement of [pySerial](https://github.com/pyserial/pyserial). * [aiozipkin](https://github.com/aio-libs/aiozipkin) - Distributed tracing instrumentation for asyncio with zipkin * [asgiref](https://github.com/django/asgiref) - Backend utils for ASGI to WSGI [integration](/@harrisonqian/awesome/wiki/platforms/integration), includes sync_to_async and async_to_sync function wrappers. * [async_property](https://github.com/ryananguiano/async_property) - [Python](/@harrisonqian/awesome/wiki/programming-languages/python) decorator for async properties. * [ruia](https://github.com/howie6879/ruia) - An async web scraping micro-framework based on asyncio. * [kubernetes_asyncio](https://github.com/tomplus/kubernetes_asyncio) - Asynchronous client library for [Kubernetes](/@harrisonqian/awesome/wiki/back-end-development/kubernetes). * [aiomisc](https://github.com/aiokitchen/aiomisc) - Miscellaneous utils for `asyncio`. * [taskiq](https://taskiq-[python](/@harrisonqian/awesome/wiki/programming-languages/python).[github](/@harrisonqian/awesome/wiki/development-environment/github).io/) - Asynchronous distributed task manager (like celery, but async). ## Writings *Documentation, blog posts, and other awesome writing about asyncio.* * [Official asyncio documentation](https://docs.[python](/@harrisonqian/awesome/wiki/programming-languages/python).org/3/library/asyncio.html) - Asynchronous I/O, event loop, coroutines and tasks. * [Short well-written intro to asyncio](https://masnun.com/python-generators-coroutines-native-coroutines-and-async-await/) - Generators, Coroutines, Native Coroutines and async/await. * [AsyncIO for the Working [Python](/@harrisonqian/awesome/wiki/programming-languages/python) Developer](https://hackernoon.com/asyncio-for-the-working-python-developer-5c468e6e2e8e) - A gentle introduction to asynchronous programming from basic examples working up to URL fetching. * [Test limits of [Python](/@harrisonqian/awesome/wiki/programming-languages/python) aiohttp](https://pawelmhm.[github](/@harrisonqian/awesome/wiki/development-environment/github).io/asyncio/python/aiohttp/2016/04/22/asyncio-aiohttp.html) - Making 1 million requests with python-aiohttp. * [ASGI (Asynchronous Server Gateway Interface)](https://asgi.readthedocs.io/en/latest/) - A spiritual successor to WSGI, intended to provide a standard interface between async-capable [Python](/@harrisonqian/awesome/wiki/programming-languages/python) web servers, [frameworks](/@harrisonqian/awesome/wiki/front-end-development/frameworks), and applications. * [First Principles Introduction to Asyncio](https://hackernoon.com/a-simple-introduction-to-pythons-asyncio-595d9c9ecf8c) - A no-buzzword first principles introduction to the internal workings of asyncio. * [Developing and [Testing](/@harrisonqian/awesome/wiki/testing/testing) an Asynchronous API with [FastAPI](/@harrisonqian/awesome/wiki/back-end-development/fastapi) and Pytest](https://testdriven.io/blog/fastapi-crud/) - This tutorial looks at how to develop and test an asynchronous API with FastAPI using Test-Driven Development (TDD). * [Python Concurrency with asyncio](https://www.manning.com/books/python-concurrency-with-asyncio) - Learn how to speed up slow [Python](/@harrisonqian/awesome/wiki/programming-languages/python) code with concurrent programming and the cutting-edge asyncio library. ## Talks *Recordings of awesome talks about asyncio.* * [Topics of Interest (Python Asyncio)](https://youtu.be/ZzfHjytDceU) | [screencast](https://youtu.be/lYe8W04ERnY) | [slides](https://speakerdeck.com/dabeaz/topics-of-interest-async) - PyCon Brasil 2015 keynote (David Beazley). * [Python Asynchronous I/O Walkthrough](https://www.youtube.com/playlist?list=PLpEcQSRWP2IjVRlTUptdD05kG-UkJynQT) - 8-part code walkthrough (Philip Guo). * [Async/await in [Python](/@harrisonqian/awesome/wiki/programming-languages/python) 3.5 and why it is awesome](https://www.youtube.com/watch?v=m28fiN9y_r8&t=132s) - EuroPython 2016 (Yury Selivanov). * [Fear and Awaiting in Async: A Savage Journey to the Heart of the Coroutine Dream](https://www.youtube.com/watch?v=E-1Y4kSsAFc) | [screencast](https://www.youtube.com/watch?v=Bm96RqNGbGo) - PyOhio 2016 keynote (David Beazley). * [Asynchronous [Python](/@harrisonqian/awesome/wiki/programming-languages/python) for the Complete Beginner](https://www.youtube.com/watch?v=iG6fr81xHKA) | [slides](https://speakerdeck.com/pycon2017/miguel-grinberg-asynchronous-python-for-the-complete-beginner) - PyCon 2017 (Miguel Grinberg). * [Demystifying [Python](/@harrisonqian/awesome/wiki/programming-languages/python)'s Async and Await Keywords](https://www.youtube.com/watch?v=F19R_M4Nay4) - 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](https://github.com/dabeaz/curio) - The coroutine concurrency library. * [Curio-Asyncio Bridge](https://github.com/dabeaz/curio/issues/190) - basic curio -> asyncio coroutine bridge. * [trio](https://github.com/python-trio/trio) - Pythonic async I/O for humans and snake people. * [trio-asyncio](https://github.com/python-trio/trio-asyncio) - re-implementation of the asyncio mainloop on top of Trio. * [AnyIO](https://github.com/agronholm/anyio) - High level asynchronous concurrency and networking framework that works on top of either trio or asyncio.