Installation
RateThrottle requires Python 3.10 or higher.
Basic Installation
Install RateThrottle using pip:
pip install ratethrottle
This installs the core package with in-memory storage support.
Installation with Optional Dependencies
RateThrottle offers optional dependencies for specific features:
Redis Storage
For distributed rate limiting with Redis:
pip install ratethrottle[redis]
Flask Integration
For Flask framework support:
pip install ratethrottle[flask]
FastAPI Integration
For FastAPI and Starlette support:
pip install ratethrottle[fastapi]
Django Integration
For Django framework support:
pip install ratethrottle[django]
All Frameworks
To install support for all frameworks and Redis:
pip install ratethrottle[frameworks]
GRPC Integration
For gRPC protocol support
pip install ratethrottle[grpc]
GraphQL Integration
For GraphQL protocol support
pip install ratethrottle[graphql]
Websocket Integration
For websocket protocol support
# WebSocket support included by default
pip install ratethrottle
# For specific socket-io or channels support:
pip install ratethrottle[websocket]
All Protocols
Install with support for all protocols
pip install ratethrottle[protocols]
All dependencies
Install with all dependencies
pip install ratethrottle[all]
Development Installation
For development with testing and documentation tools:
pip install ratethrottle[dev]
This includes:
pytest and testing utilities
black, flake8, mypy for code quality
pre-commit hooks
Type stubs for dependencies
Installing from Source
To install the latest development version from GitHub:
git clone https://github.com/MykeChidi/ratethrottle.git
cd ratethrottle
pip install -e .
For development with all dependencies:
pip install -e ".[dev,all]"
Verifying Installation
Verify your installation:
import ratethrottle
print(ratethrottle.__version__)
System Requirements
- Python Version
Python 3.10, 3.11, or 3.12
- Operating Systems
Linux, macOS, Windows
- Optional Dependencies
Redis 5.0+ (for Redis storage backend)
Framework-specific versions as specified in optional dependencies
Next Steps
Read the Quick Start guide to get started quickly
Explore Basic Usage for detailed examples
Check Configuration for configuration options