{"repo":"laurentS/slowapi","free":true,"listed":false,"github":"https://github.com/laurentS/slowapi","clone":"git clone https://github.com/laurentS/slowapi.git","description":"A rate limiter for Starlette and FastAPI","language":"Python","stars":2048,"topics":["starlette","fastapi","rate-limiter","asgi","python","uvicorn"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"SlowApi A rate limiting library for Starlette and FastAPI adapted from flask-limiter. This package is used in various production setups, handling millions of requests per month, and seems to behave as expected. There might be some API changes when changing the code to be fully async , but we will notify users via appropriate semver version changes. The documentation is on read the docs. Quick start Installation slowapi is available from pypi so you can install it as usual: Features Most feature are coming from FlaskLimiter and the underlying limits. Supported now: - Single and multiple limit decorator on endpoint functions to apply limits - redis, memcached and memory backends to track your limits (memory as a fallback) - support for sync and async HTTP endpoints - Support for shared limits across a set of routes - The library aims to support all currently supported versions of python Limitations and known issues The request argument must be explicitly passed to your endpoint, or slowapi won't be able to hook into it. In other words, write: and not: websocket endpoints are not supported yet. Developing and contributing PRs are more than welcome! Please include tests for your changes :) The package uses poetry to manage dependencies. To setup your dev env: To run the tests: Credits Credits go to flask-limiter of which SlowApi is a (still partial) adaptation to Starlette and FastAPI. It's also important to mention that the actual rate limiting work is done by limits, slowapi is","default_branch":null,"files":null,"tree":[],"storefront":"/r/laurentS","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/laurentS/slowapi/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}