An async HTTP API for Flowdacity Queue (FQ), built with Starlette and Uvicorn.
- Python 3.12+
- Redis 7+
uv sync --group devIf you prefer a virtualenv without uv:
python -m venv .venv
source .venv/bin/activate
pip install -e .
pip install pytest pytest-covThe server reads all queue and Redis settings from environment variables. No config file is required.
These application settings are validated at startup by QueueServerSettings with pydantic-settings.
Boolean env vars accept only true or false.
PORT is not part of QueueServerSettings. It is runtime launcher configuration used by the container entrypoint or by the uvicorn CLI, so pass it as a launcher environment variable or --port argument.
Start Redis:
make redis-upRun the API:
export PORT=8300
export REDIS_HOST=127.0.0.1
uv run uvicorn asgi:app --host 0.0.0.0 --port "${PORT}"docker-compose.yml now passes the queue settings through env vars, so there is no mounted config file:
docker compose up --buildcurl http://127.0.0.1:8300/
curl -X POST http://127.0.0.1:8300/enqueue/sms/user42/ \
-H "Content-Type: application/json" \
-d '{"job_id":"job-1","payload":{"message":"hi"},"interval":1000}'
curl http://127.0.0.1:8300/dequeue/sms/
curl -X POST http://127.0.0.1:8300/finish/sms/user42/job-1/
curl http://127.0.0.1:8300/metrics/
curl http://127.0.0.1:8300/metrics/sms/user42/make testMIT — see LICENSE.txt.
