python-gitlab 1.4 gitlab使用v3接口
import gitlab host = 'http://xxxx.com' project_id = "xxxx" gl = gitlab.Gitlab(host, private_token="xxx", api_version='3') p = gl.projects.get(project_id, lazy=True) print(p.branches.list())
https://github.com/python-gitlab/python-gitlab/issues/710