long2ice / fastapi-limiter

A request rate limiter for fastapi
https://github.com/long2ice/fastapi-limiter
Apache License 2.0
487 stars 53 forks source link

The method "on_event" in class "FastAPI" is deprecated #44

Open MuhammadNizamani opened 9 months ago

MuhammadNizamani commented 9 months ago

on_event is deprecated so I am I suppose to run following code ?

async def startup():
    redis = redis.from_url("redis://localhost", encoding="utf-8", decode_responses=True)
    await FastAPILimiter.init(redis)

please help

If this issue is not been resolve I would love to solve this issue