diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-11 06:30:14 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-11 06:30:14 +0200 |
commit | 4cc9739f600321b3117953b083a86a4e4c306b2f (patch) | |
tree | 0cdd52024b0d610077954551f98ea34bb7e2a43c | |
parent | 68b798b96330db70c94a7aba7bb96c6cdab8718c (diff) | |
download | gitlab-4cc9739f600321b3117953b083a86a4e4c306b2f.tar.gz |
api-usage: bit more detail for listing with `all`
-rw-r--r-- | docs/api-usage.rst | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst index 6513c9d..d435c31 100644 --- a/docs/api-usage.rst +++ b/docs/api-usage.rst @@ -228,15 +228,16 @@ parameter to get all the items when using listing methods: .. warning:: - python-gitlab will iterate over the list by calling the corresponding API - multiple times. This might take some time if you have a lot of items to - retrieve. This might also consume a lot of memory as all the items will be - stored in RAM. If you're encountering the python recursion limit exception, - use ``safe_all=True`` instead to stop pagination automatically if the - recursion limit is hit. - -With v4, ``list()`` methods can also return a generator object which will -handle the next calls to the API when required: + With API v3 python-gitlab will iterate over the list by calling the + corresponding API multiple times. This might take some time if you have a + lot of items to retrieve. This might also consume a lot of memory as all the + items will be stored in RAM. If you're encountering the python recursion + limit exception, use ``safe_all=True`` to stop pagination automatically if + the recursion limit is hit. + +With API v4, ``list()`` methods can also return a generator object which will +handle the next calls to the API when required. This is the recommended way to +iterate through a large number of items: .. code-block:: python |