Skip to content

Integrations

Framework-specific guides for integrating Cancelable.

Available Integrations

Cancelable provides first-class integration with popular async frameworks:

FastAPI

Web framework integration with request-scoped cancelation.

Features:

  • Automatic cancelation on client disconnect
  • Request-scoped operation tracking
  • Dependency injection support
  • Background task management

Quick Example:

from fastapi import FastAPI, Depends
from hother.cancelable.integrations.fastapi import cancelable_dependency

app = FastAPI()

@app.get("/process")
async def process(cancel: Cancelable = Depends(cancelable_dependency)):
    async with cancel:
        return await heavy_computation()

Read FastAPI Guide →

Future Integrations

Planning to add:

  • Django (async views)
  • Starlette
  • aiohttp
  • Redis (aioredis)
  • Celery

Want to see an integration? Open an issue!

Next Steps