Skip to content

Commit 8171359

Browse files
author
Jared Deckard
committed
Describe fork changes in readme
1 parent abe6c3b commit 8171359

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
ratelimit |build| |maintainability|
22
===================================
33

4+
This project is a fork of `tomasbasham/ratelimit <https://github.com/tomasbasham/ratelimit>`_
5+
that implements a `sliding log <https://konghq.com/blog/how-to-design-a-scalable-rate-limiting-algorithm/>`_
6+
for correctness and provides persistance via sqlite. See the usage section on
7+
`Persistence <#persistence>`_ for more details. Turning on persistence is highly
8+
recommended, especially during development, to ensure rate limits are respected
9+
between application restarts.
10+
411
APIs are a very common way to interact with web services. As the need to
512
consume data grows, so does the number of API calls necessary to remain up to
613
date with data sources. However many API providers constrain developers from
@@ -122,6 +129,9 @@ cost of halting the thread.
122129
raise Exception('API response: {}'.format(response.status_code))
123130
return response
124131
132+
Persistence
133+
~~~~~~~~~~~
134+
125135
If a limit needs to be respected between application restarts or shared by
126136
multiple processes, the ``storage`` argument can be used to save the limit
127137
state to disk and load it automatically.

0 commit comments

Comments
 (0)