Async utilities for backend python services developed by Quantmind.
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
@taskdecorator, schedule them withevery()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
asyncpgand SQLAlchemy, with pagination and schema migrations. See Database. - Event dispatchers — sync and async
Dispatchertypes for decoupling event sources from handlers. See Dispatchers. - HTTP client helpers — a unified async client wrapping
httpxandaiohttp. See HTTP Client. - CLI tooling — ready-made
click/richcommand-line interfaces for task managers and databases.
Installation¶
This is a python package you can install via pip:
To install all the dependencies:
this includes the following extra dependencies:clifor the command line interface using click and richdbfor database support with asyncpg and sqlalchemyhttpfor http client support with httpx and aiohttplogfor JSON logging support with python-json-loggerk8sfor Kubernetes support for CPU bound tasks
Development¶
You can run the examples via
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.