File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,13 @@ parameter to get all the items when using listing methods:
189189 all_groups = gl.groups.list(all = True )
190190 all_owned_projects = gl.projects.owned(all = True )
191191
192+ You can define the ``per_page `` value globally to avoid passing it to every
193+ ``list() `` method call:
194+
195+ .. code-block :: python
196+
197+ gl = gitlab.Gitlab(url, token, per_page = 50 )
198+
192199 ``list() `` methods can also return a generator object which will handle the
193200next calls to the API when required. This is the recommended way to iterate
194201through a large number of items:
Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ parameters. You can override the values in each GitLab server section.
7171 * - ``api_version ``
7272 - ``3 `` ou ``4 ``
7373 - The API version to use to make queries. Requires python-gitlab >= 1.3.0.
74+ * - ``per_page ``
75+ - Integer between 1 and 100
76+ - The number of items to return in listing queries. GitLab limits the
77+ value at 100.
7478
7579You must define the ``url `` in each GitLab server section.
7680
You can’t perform that action at this time.
0 commit comments