FastAPI
z4j-fastapi · Upstream project
Lifespan-hook integration for async stacks.
FastAPI lifespan-aware. Most commonly paired with arq or taskiq (both async-native) but works with Celery or RQ when your sync stack calls for them. Dependency-injection friendly.
Install
pip install z4j-fastapi[arq] Wire it in
from fastapi import FastAPI
from z4j_fastapi import install
app = FastAPI(lifespan=install) What you get
FastAPI-specific features
FastAPI lifespan integration
Async-native (arq / taskiq best fit)
Dependency-injection helpers
Works alongside Celery / RQ too
WebSocket-aware health checks
Engine pairings
FastAPI works with every z4j engine
The framework adapter handles lifecycle and config. Any engine adapter slots in alongside.
Celery
The industry standard, covered end-to-end.
Learn more
RQ
Lightweight Redis queue, fully instrumented.
Learn more
Dramatiq
Middleware-driven Dramatiq observability.
Learn more
Huey
Lightweight Redis/SQLite queue, first-class.
Learn more
arq
Async Redis queue for FastAPI-era Python.
Learn more
taskiq
Broker-agnostic async task framework.
Learn more Other platforms