Skip to content

eltonjncorreia/fastapi-rate-limit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastapi-rate-limit

Middleware for rate limit

Usage

from fastapi import FastAPI
from rate_limit import RateLimitMiddleware


app = FastAPI()

# Adiciona o middleware com limite de 100 requisições por 60 segundos
app.add_middleware(RateLimitMiddleware, max_requests=100, seconds=60)


@app.get("/")
async def root():
    return {"message": "Hello RateLimitMiddleware"}

About

Middleware for rate limit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages