A rate limiting library for Starlette and FastAPI applications, adapted from flask-limiter.
SlowApi is a rate limiting library for Starlette and FastAPI web frameworks, adapted from flask-limiter. It helps developers control request rates to prevent API abuse and ensure fair usage by applying limits to endpoints. The library supports multiple storage backends and works with both sync and async endpoints.
Developers building Starlette or FastAPI applications who need to implement rate limiting for API endpoints, particularly those handling public or high-traffic services.
Developers choose SlowApi because it provides a production-tested, framework-specific rate limiting solution that integrates natively with FastAPI and Starlette, offers multiple backend options, and maintains compatibility with modern Python async patterns.
A rate limiter for Starlette and FastAPI
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Redis, Memcached, and in-memory storage for flexible rate limit tracking, allowing scalability in distributed systems as per the README.
Works with both synchronous and asynchronous HTTP endpoints, making it suitable for modern Python async web applications without framework conflicts.
Used in production setups handling millions of requests per month, ensuring it's battle-tested for real-world use, as stated in the documentation.
Allows defining rate limits that apply across groups of routes, enabling consistent rate control strategies for API endpoints.
Endpoint functions must explicitly include the request argument, which the README notes as a limitation, adding boilerplate and complexity in FastAPI patterns.
The README explicitly states that WebSocket endpoints are not supported yet, limiting its usefulness for real-time or bidirectional communication applications.
Designed only for Starlette and FastAPI, so it's not a general-purpose rate limiting library and may require adaptation for other Python web frameworks.