git-python-api

Ceci est une ancienne révision du document !


API de Git en Python

https://python-gitlab.readthedocs.io

sudo pip3 install --upgrade python-gitlab
import gitlab
 
gl = gitlab.Gitlab('http://gitlab.com', private_token='xx')
projects = gl.projects.list(visibility='private', all=True) # récupère tous les dépôts
 
for p in projects:
    print(p.path_with_namespace + " - " + p.ssh_url_to_repo)

sudo pip3 install --upgrade pygithub
import github
 
gh = github.Github('<private token>')
projects = gh.get_user().get_repos();
 
for p in projects:
    print(p.full_name + " - " + p.ssh_url)
  • git-python-api.1617548516.txt.gz
  • Dernière modification : 2021/04/04 17:01
  • de 127.0.0.1