v0.3.7
What's Changed
- feat (#974): add FastAPI Context by @Lancetnik in #1060
- chore: update pre-commit by @davorrunje in #1058
Support regular FastStream Context with FastAPI plugin
from fastapi import FastAPI
from faststream.redis.fastapi import RedisRouter, Logger
router = RedisRouter()
@router.subscriber("test")
async def handler(msg, logger: Logger):
logger.info(msg)
app = FastAPI(lifespan=router.lifespan_context)
app.include_router(router)
Full Changelog: 0.3.6...0.3.7