Skip to content

aio-fluid — async utilities for backend Python services

Async utilities for backend python services developed by Quantmind.

PyPI version Python versions Python downloads build codecov

Documentation: fluid.quantmind.com

Source Code: github.com/quantmind/aio-fluid

Features

  • Async workers — composable components with a managed start/stop lifecycle; the building block everything else is built on. See Workers.
  • Task scheduler & consumer — declare tasks with a @task decorator, schedule them with every() or cron expressions, run them concurrently with priorities and concurrency limits, and offload CPU-bound work to subprocesses or Kubernetes Jobs. Backed by a pluggable broker (Redis by default). See Tasks.
  • Async Postgres CRUD — a typed CRUD layer over asyncpg and SQLAlchemy, with pagination and schema migrations. See Database.
  • Event dispatchers — sync and async Dispatcher types for decoupling event sources from handlers. See Dispatchers.
  • HTTP client helpers — a unified async client wrapping httpx and aiohttp. See HTTP Client.
  • CLI tooling — ready-made click / rich command-line interfaces for task managers and databases.

Installation

This is a python package you can install via pip:

pip install aio-fluid

To install all the dependencies:

pip install aio-fluid[cli, db, http, log, k8s]
this includes the following extra dependencies:

Development

You can run the examples via

uv run python -m examples

We use uv as a development tool to run the examples and tests, but you can also use python directly if that's your preference.

License

This project is licensed under the BSD License - see the LICENSE file for details.