limits#

https://img.shields.io/github/last-commit/alisaifee/limits?logo=github&style=for-the-badge&labelColor=#282828 https://img.shields.io/github/workflow/status/alisaifee/limits/CI?logo=github&style=for-the-badge&labelColor=#282828 https://img.shields.io/codecov/c/github/alisaifee/limits?logo=codecov&style=for-the-badge&labelColor=#282828 https://img.shields.io/pypi/pyversions/limits?style=for-the-badge&logo=pypi

limits is a python library to perform rate limiting with commonly used storage backends (Redis, Memcached & MongoDB).

Get started by taking a look at Installation and Quickstart.

To learn more about the different strategies refer to the Rate limiting strategies section.

For an overview of supported backends refer to Storage Backends.


Development#

The source is available on Github

To get started

$ git clone git://github.com/alisaifee/limits.git
$ cd limits
$ pip install -r requirements/dev.txt

Since limits integrates with various backend storages, local development and running tests requires a a working docker & docker-compose installation.

Running the tests will start the relevant containers automatically - but will leave them running so as to not incur the overhead of starting up on each test run. To run the tests:

$ pytest

Once you’re done - you will probably want to clean up the docker containers:

$ docker-compose down

Projects using limits#

  • Flask-Limiter : Rate limiting extension for Flask applications.

  • djlimiter: Rate limiting middleware for Django applications.

  • sanic-limiter: Rate limiting middleware for Sanic applications.

  • Falcon-Limiter : Rate limiting extension for Falcon applications.

References#

Contributors#