| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2abf9ab commit ad4de20
1 file 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: | |||
| 326 | 326 | ||
| 327 | 327 | Reference: | |
| 328 | 328 | http://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. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments