application.make("rate")or by using the
keythat will uniquely identify the action
RateProviderclass in our providers list:
100/dayyou will be able to add a global limit which does not link this limit to a given user, view or IP address. It's really an absolute limit that you will define on your HTTP requests.
Limiterare simple classes with a
allow(request)method that will be called each time a throttled HTTP request is made.
by(key)to define how we should identify users. (TODO: explain more)
/apiendpoints we will see some new headers in the response:
X-Rate-Limit-Resetwhich is the timestamp in seconds defining when rate limit will be reset and when api endpoint will be available again and
Retry-Afterwhich is the number of seconds in which rate limit will be reset:
ThrottleRequestsExceptionexception is raised and a response with status code
429: Too Many Requestsand content
Too many attemptsis returned.
get_response()method to the limiter.