File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1
1
ratelimit |build | |maintainability |
2
2
===================================
3
3
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
+
4
11
APIs are a very common way to interact with web services. As the need to
5
12
consume data grows, so does the number of API calls necessary to remain up to
6
13
date with data sources. However many API providers constrain developers from
@@ -122,6 +129,9 @@ cost of halting the thread.
122
129
raise Exception (' API response: {} ' .format(response.status_code))
123
130
return response
124
131
132
+ Persistence
133
+ ~~~~~~~~~~~
134
+
125
135
If a limit needs to be respected between application restarts or shared by
126
136
multiple processes, the ``storage `` argument can be used to save the limit
127
137
state to disk and load it automatically.
You can’t perform that action at this time.
0 commit comments