| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 47cb278 commit 29e2efe
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -106,19 +106,28 @@ actions on the GitLab resources. For example: | |||
| 106 | 106 | Pagination | |
| 107 | 107 | ========== | |
| 108 | 108 | ||
| 109 | - You can use pagination to go throught long lists: | ||
| 109 | + You can use pagination to iterate over long lists. All the Gitlab objects | ||
| 110 | + listing methods support the ``page`` and ``per_page`` parameters: | ||
| 110 | 111 | ||
| 111 | 112 | .. code-block:: python | |
| 112 | 113 | ||
| 113 | 114 | ten_first_groups = gl.groups.list(page=0, per_page=10) | |
| 114 | 115 | ||
| 115 | - Use the ``all`` parameter to get all the items when using listing methods: | ||
| 116 | + By default GitLab does not return the complete list of items. Use the ``all`` | ||
| 117 | + parameter to get all the items when using listing methods: | ||
| 116 | 118 | ||
| 117 | 119 | .. code-block:: python | |
| 118 | 120 | ||
| 119 | 121 | all_groups = gl.groups.list(all=True) | |
| 120 | 122 | all_owned_projects = gl.projects.owned(all=True) | |
| 121 | 123 | ||
| 124 | + .. note:: | ||
| 125 | + | ||
| 126 | + python-gitlab will iterate over the list by calling the correspnding API | ||
| 127 | + multiple times. This might take some time if you have a lot of items to | ||
| 128 | + retrieve. This might also consume a lot of memory as all the items will be | ||
| 129 | + stored in RAM. | ||
| 130 | + | ||
| 122 | 131 | Sudo | |
| 123 | 132 | ==== | |
| 124 | 133 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments