A library for throttling algorithms
This library is intended to be a collection of algorithms that can be reused when throttling user interactions with a resource (e.g., an API).
This library is still a work in progress. See goals for what we’re striving for.
pip install rush
Below is the project’s list of goals broken down by category
- A basic periodic interval rate limiter - N accesses per period of time. An example would be the GitHub API that limits authenticated users to 5,000 requests per hour.
- A leaky bucket rate limiter based off of the Generic Cell Ratelimiting Algorithm (a.k.a, GCRA).
- A Redis storage backend for rate limit results so that users can have state persisted across machines and application restarts.
- A Redis GCRA implementation, likely borrowed from Ruby’s redis-gcra gem.
- 100% test coverage
- Code auto-formatted by Black (CI will check if formatting wasn’t run prior to push)
- Commit messages following a uniform Kernel-like style
- Flake8, pylint, mypy, and bandit linting
- Complete type annotations
- Complete documentation linted by doclint and strictly compiled by Sphinx
- Composable - ability to confidently use one algorithmic limiter with any properly written storage backend
- Easy to understand - hopefully it will be easy to understand how the library works because of how composable it will be
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size rush-2018.12.1-py3-none-any.whl (15.5 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size rush-2018.12.1.tar.gz (11.1 kB)||File type Source||Python version None||Upload date||Hashes View|