File: index.rst

package info (click to toggle)
python-limits 4.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,064 kB
  • sloc: python: 7,833; makefile: 162; sh: 59
file content (79 lines) | stat: -rw-r--r-- 2,537 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
========
*limits*
========

**limits** is a python library for rate limiting via multiple strategies
with commonly used storage backends (Redis, Memcached, MongoDB & Etcd).

The library provides identical APIs for use in sync and
:ref:`async <async:async support>`  codebases.

Get started by taking a look at :ref:`installation:installation` and :ref:`quickstart:quickstart`.

To learn more about the different strategies refer to the :ref:`strategies:rate limiting strategies` section.

For an overview of supported backends refer to :ref:`storage:storage backends`.

.. toctree::
    :maxdepth: 3
    :hidden:

    installation
    quickstart
    strategies
    storage
    async
    api
    custom-storage
    changelog


----


Development
===========

The source is available on `Github <https://github.com/alisaifee/limits>`_

To get started

.. code:: console

   $ git clone https://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 working `docker & docker-compose installation <https://docs.docker.com/compose/gettingstarted/>`_.

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:

.. code:: console

   $ pytest

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

.. code:: console

   $ docker-compose down


Projects using *limits*
=======================

   - `Flask-Limiter <http://flask-limiter.readthedocs.org>`_ : Rate limiting extension for Flask applications.
   - `djlimiter <http://djlimiter.readthedocs.org>`_: Rate limiting middleware for Django applications.
   - `sanic-limiter <https://github.com/bohea/sanic-limiter>`_: Rate limiting middleware for Sanic applications.
   - `Falcon-Limiter <https://falcon-limiter.readthedocs.org>`_ : Rate limiting extension for Falcon applications.
   - `django-ratelimiter <https://andriykohut.github.io/django-ratelimiter/>`_: Rate limiting decorator and middleware for Django applications.

References
==========

   - `Redis: rate limiting pattern #2 <http://redis.io/commands/INCR>`_
   - `DomainTools: redis rate limiter <https://github.com/DomainTools/rate-limit>`_
   - `Cloudflare: How we built rate limiting capable of scaling to millions of domains <https://blog.cloudflare.com/counting-things-a-lot-of-different-things/>`_
.. include:: ../../CONTRIBUTIONS.rst