File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -326,3 +326,26 @@ The following sample illustrates how to use a client-side certificate:
326326
327327 Reference:
328328http://docs.python-requests.org/en/master/user/advanced/#client-side-certificates
329+
330+ Rate limits
331+ -----------
332+
333+ python-gitlab will obey the rate limit of the GitLab server by default.
334+ On receiving a 429 response (Too Many Requests), python-gitlab will sleep for the amount of time
335+ in the Retry-After header, that GitLab sends back.
336+
337+ If you don't want to wait, you can disable the rate-limiting feature, by supplying the
338+ ``obey_rate_limit `` argument.
339+
340+ .. code-block :: python
341+
342+ import gitlab
343+ import requests
344+
345+ gl = gitlab.gitlab(url, token, api_version = 4 )
346+ gl.projects.list(all = True , obey_rate_limit = False )
347+
348+
349+ .. warning ::
350+
351+ You will get an Exception, if you then go over the rate limit of your GitLab instance.
You can’t perform that action at this time.
0 commit comments