Awesome Trio Libraries¶
You have completed the tutorial, and are enthusiastic about building
great new applications and libraries with async functionality.
However, to get much useful work done you will want to use some of
the great libraries that support Trio-flavoured concurrency. This list
is not complete, but gives a starting point. Another great way to find
Trio-compatible libraries is to search on PyPI for the
Framework :: Trio
tag -> PyPI Search
cookiecutter-trio - This is a cookiecutter template for Python projects that use Trio. It makes it easy to start a new project, by providing a bunch of preconfigured boilerplate.
pytest-trio - Pytest plugin to test async-enabled Trio functions.
sphinxcontrib-trio - Make Sphinx better at documenting Python functions and methods. In particular, it makes it easy to document async functions.
Web and HTML¶
httpx - HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2.
trio-websocket - A WebSocket client and server implementation striving for safety, correctness, and ergonomics.
quart-trio - Like Flask, but for Trio. A simple and powerful framework for building async web applications and REST APIs. Tip: this is an ASGI-based framework, so you’ll also need an HTTP server with ASGI support.
hypercorn - An HTTP server for hosting your ASGI apps. Supports HTTP/1.1, HTTP/2, HTTP/3, and Websockets. Can be run as a standalone server, or embedded in a larger Trio app. Use it with
quart-trio, or any other Trio-compatible ASGI framework.
pura - A simple web framework for embedding realtime graphical visualization into Trio apps, enabling inspection and manipulation of program state during development.
pyscalpel - A fast and powerful webscraping library.
muffin - Muffin is a fast, simple ASGI web-framework
asgi-tools - Tools to quickly build lightest ASGI apps (also contains a test client with lifespan, websocket support)
starlette - The little ASGI framework that shines.
triopg - PostgreSQL client for Trio based on asyncpg.
trio-mysql - Pure Python MySQL Client.
sqlalchemy_aio - Add asyncio and Trio support to SQLAlchemy core, derived from alchimia.
redio - Redis client, pure Python and Trio.
trio_redis - A Redis client for Trio. Depends on hiredis-py.
aio-databases - Async Support for various databases (triopg, trio-mysql)
peewee-aio - Peewee Async ORM with trio support (triopg, trio-mysql).
DistMQTT - DistMQTT is an open source MQTT client and broker implementation. It is a fork of hbmqtt with support for anyio and DistKV.
asyncgpio - Allows easy access to the GPIO pins on your Raspberry Pi or similar embedded computer.
asyncowfs - High-level, object-oriented access to 1wire sensors and actors.
DistKV - a persistent, distributed, master-less key/value storage with async notification and some IoT-related plug-ins.
Building Command Line Apps¶
Building GUI Apps¶
Slurry - Slurry is a microframework for building reactive, data processing applications with Trio.
purepc - Native, async Python gRPC client and server implementation using anyio.
Tools and Utilities¶
trio-typing - Type hints for Trio and related projects.
trio-util - An assortment of utilities for the Trio async/await framework.
tricycle - This is a library of interesting-but-maybe-not-yet-fully-proven extensions to Trio.
tenacity - Retrying library for Python with async/await support.
perf-timer - A code timer with Trio async support (see
TrioPerfTimer). Collects execution time of a block of code excluding time when the coroutine isn’t scheduled, such as during blocking I/O and sleep. Also offers
trio_perf_counter()for low-level timing.
aiometer - Execute lots of tasks concurrently while controlling concurrency limits
triotp - OTP framework for Python Trio
anyio - AnyIO is a asynchronous compatibility API that allows applications and libraries written against it to run unmodified on asyncio, curio and trio.
sniffio - This is a tiny package whose only purpose is to let you detect which async library your code is running under.
trio-asyncio - Trio-Asyncio lets you use many asyncio libraries from your Trio app.