File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,20 @@ You can also use configuration files to create ``gitlab.Gitlab`` objects:
4040 See the :ref: `cli_configuration ` section for more information about
4141configuration files.
4242
43+ **GitLab v4 support **
44+
45+ ``python-gitlab `` uses the v3 GitLab API by default. Use the ``api_version ``
46+ parameter to switch to v4:
47+
48+ .. code-block :: python
49+
50+ import gitlab
51+
52+ gl = gitlab.Gitlab(' http://10.0.0.1' , ' JVNSESs8EwWRx5yDxM5q' , api_version = 4 )
53+
54+ .. warning ::
55+
56+ The v4 support is experimental.
4357
4458Managers
4559========
Original file line number Diff line number Diff line change @@ -36,10 +36,12 @@ The configuration file uses the ``INI`` format. It contains at least a
3636 default = somewhere
3737 ssl_verify = true
3838 timeout = 5
39+ api_version = 3
3940
4041 [somewhere]
4142 url = https://some.whe.re
4243 private_token = vTbFeqJYCY3sibBP7BZM
44+ api_version = 4
4345
4446 [elsewhere]
4547 url = http://else.whe.re:8080
@@ -78,6 +80,8 @@ section.
7880 - URL for the GitLab server
7981 * - ``private_token ``
8082 - Your user token. Login/password is not supported.
83+ * - ``api_version ``
84+ - API version to use (``3 `` or ``4 ``), defaults to ``3 ``
8185 * - ``http_username ``
8286 - Username for optional HTTP authentication
8387 * - ``http_password ``
You can’t perform that action at this time.
0 commit comments