throttled-py
๐ง High-performance Python rate limiting library with multiple algorithms (Fixed Window, Sliding Window, Token Bucket, Leaky Bucket & GCRA) and storage backends (Redis, In-Memory).
File Explorer
Download Latest Version (.zip)- SKILL.md
- use-skills.instructions.md
- code_quality.yml
- commitlint.yml
- contrib-compatibility.yml
- release-drafter.yml
- release.yml
- unittest.yml
- copilot-instructions.md
- PULL_REQUEST_TEMPLATE.md
- release-drafter-config.yml
- 2-1-1.png
- 2-1-2.png
- 2-2-1.png
- 2-2-4.png
- 2-3-1.png
- 2-4-0.png
- 2-4-1.png
- 2-5-1.png
- readme.md
- custom.css
- layout.html
- hooks.rst
- index.rst
- store-configuration.rst
- fastapi.rst
- flask.rst
- index.rst
- index.rst
- opentelemetry.rst
- context-manager.rst
- decorator.rst
- function-call.rst
- index.rst
- quota-configuration.rst
- specifying-algorithms.rst
- store-backends.rst
- wait-retry.rst
- api.rst
- benchmarks.rst
- changelog.rst
- conf.py
- index.rst
- installation.rst
- Makefile
- requirements.txt
- __init__.py
- basic_example.py
- custom_key_func_example.py
- multi_route_example.py
- remote_address_example.py
- __init__.py
- basic_example.py
- custom_key_func_example.py
- multi_route_example.py
- remote_address_example.py
- __init__.py
- __init__.py
- context_manager_example.py
- custom_hook_example.py
- decorator_example.py
- function_call_example.py
- global_memory_example.py
- hook_example.py
- memory_example.py
- otel_hook_example.py
- quickstart_example.py
- quota_dsl_example.py
- redis_cluster_example.py
- redis_example.py
- redis_sentinel_example.py
- using_algorithm_example.py
- wait_retry_concurrent_example.py
- wait_retry_example.py
- wait_retry_function_call_example.py
- __init__.py
- context_manager_example.py
- custom_hook_example.py
- decorator_example.py
- function_call_example.py
- global_memory_example.py
- hook_example.py
- memory_example.py
- otel_hook_example.py
- quickstart_example.py
- quota_dsl_example.py
- quota_example.py
- redis_cluster_example.py
- redis_example.py
- redis_sentinel_example.py
- using_algorithm_example.py
- wait_retry_concurrent_example.py
- wait_retry_example.py
- wait_retry_function_call_example.py
- __init__.py
- __init__.py
- test_throttled.py
- __init__.py
- conftest.py
- test_exceptions.py
- test_headers.py
- test_hooks.py
- test_key_funcs.py
- test_keys.py
- test_limiter.py
- test_store_backends.py
- test_store_unavailable.py
- __init__.py
- test_hook.py
- __init__.py
- __init__.py
- test_fixed_window.py
- test_gcra.py
- test_leaking_bucket.py
- test_rate_limiter.py
- test_sliding_window.py
- test_token_bucket.py
- __init__.py
- test_memory.py
- test_store.py
- unavailable.py
- __init__.py
- conftest.py
- test_hooks.py
- test_hooks_concurrent.py
- test_throttled.py
- __init__.py
- test_otel_hook.py
- test_throttled.py
- __init__.py
- conftest.py
- test_exceptions.py
- test_headers.py
- test_key_funcs.py
- test_keys.py
- test_limiter.py
- test_store_unavailable.py
- __init__.py
- test_otel_hook.py
- __init__.py
- __init__.py
- parametrizes.py
- test_base.py
- test_fixed_window.py
- test_gcra.py
- test_leaking_bucket.py
- test_quota_parser.py
- test_rate_limiter.py
- test_sliding_window.py
- test_token_bucket.py
- __init__.py
- parametrizes.py
- test_memory.py
- test_redis_pool.py
- test_store.py
- unavailable.py
- __init__.py
- conftest.py
- test_hooks.py
- test_throttled.py
- test_utils.py
- utils.py
- __init__.py
- logic.py
- __init__.py
- exceptions.py
- headers.py
- key_funcs.py
- keys.py
- limiter.py
- middleware.py
- __init__.py
- hook.py
- __init__.py
- __init__.py
- base.py
- fixed_window.py
- gcra.py
- leaking_bucket.py
- sliding_window.py
- token_bucket.py
- __init__.py
- base.py
- memory.py
- redis.py
- __init__.py
- hooks.py
- throttled.py
- __init__.py
- exceptions.py
- headers.py
- key_funcs.py
- keys.py
- limiter.py
- __init__.py
- hook.py
- __init__.py
- fixed_window.lua
- gcra.lua
- gcra_peek.lua
- leaking_bucket.lua
- sliding_window.lua
- token_bucket.lua
- __init__.py
- base.py
- fixed_window.py
- gcra.py
- leaking_bucket.py
- quota_parser.py
- sliding_window.py
- token_bucket.py
- __init__.py
- base.py
- memory.py
- redis.py
- redis_pool.py
- wraps.py
- __init__.py
- constants.py
- exceptions.py
- hooks.py
- py.typed
- throttled.py
- types.py
- utils.py
- .gitignore
- .pre-commit-config.yaml
- .readthedocs.yaml
- AGENTS.md
- CHANGELOG.rst
- CHANGELOG_EN.rst
- codecov.yml
- CONTRIBUTING.md
- LICENSE
- Makefile
- pyproject.toml
- README.md
- README_ZH.md
- uv.lock
๐ Installation Guide
git clone https://github.com/ZhuoZhuoCrayon/throttled-py
Downloads the entire project code from GitHub to your computer.
cd throttled-py
Moves into the project folder you just downloaded.
2. Python
Easy Recommended$ pip install throttled-py
Installs the Python libraries listed in requirements.txt (or similar).
$ pip install "throttled-py[redis]"
Installs the Python libraries listed in requirements.txt (or similar).
$ pip install "throttled-py[otel]"
Installs the Python libraries listed in requirements.txt (or similar).
$ pip install "throttled-py[flask]"
Installs the Python libraries listed in requirements.txt (or similar).
$ pip install "throttled-py[redis,otel]"
Installs the Python libraries listed in requirements.txt (or similar).
Pulled directly from this repo's README.
3. Make
Medium- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make
Compiles the code based on the generated build configuration to produce an executable.
