SlowAPI is a ratelimiter library for FastAPI and Starlette adapted from flask-limiter. This package is used in various production setups, handling millions of requests per month, and seems to behave as expected. Here is an example of how it can be used:
@limiter.limit("5/minute")
async def myendpoint(request: Request)
pass