当前位置:网站首页>Python3 operating gitlab
Python3 operating gitlab
2020-11-06 22:38:00 【Leaf blade】
#coding=utf-8
import base64
# Import python-gitlab library
import gitlab
url = 'http://192.168.x.xxx'
token = 'D98-t7HJpXxwhq8qbXcJ'
# Sign in
gl = gitlab.Gitlab(url, token)
# Get the project
project = gl.projects.get('ZEP-BACKEND/ZEP-BACKEND-JAVA')
# obtain javademo/config Directory file list , Version is master
items = project.repository_tree(path='javademo', ref='master')
def get_all_files(path=None, ref='master'):
items = project.repository_tree(path=path, ref=ref)
for item in items:
if item['mode'] == '040000':
# Call recursion , Achieve directory recursive output
get_all_files(item['path'], ref)
if item['mode'] == '100644':
print("===({})===".format(item['path']))
get_all_files(path='javademo', ref='master')
版权声明
本文为[Leaf blade]所创,转载请带上原文链接,感谢
边栏推荐
- August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
- How to deploy Gantt chart quickly and correctly
- Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
- 心理咨询app开发所具备的优点与功能
- List to map (split the list according to the key, and the value of the same key is a list)
- How does varhart xgantt represent working days on a calendar
- How to add modules to nginx image?
- 2020-08-17: how to solve data skew in detail?
- 小熊派开发板实践:智慧路灯沙箱实验之真实设备接入
- 2020 database technology conference helps technology upgrade
猜你喜欢
Nanjing logo design and production, guide VI system design
Stm32f030k6t6 compatible replacement smart mm32f031k6t6
Git SSH bad permissions
2020-08-19: what mechanism does TCP ensure reliability?
Gantt chart grouping activities tutorial
超高频RFID医疗血液管理系统应用
Win7 AppCrash (solution)
The essence of transaction and the principle of deadlock
甘特图对活动进行分组教程
南京标识标牌设计制作,导视VI系统设计
随机推荐
如何才能快速正确的部署甘特图
JS string - string string object method
Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification
NAND FLASH的接口控制设计
August 18, 2020: introduce Mr process?
Es create a new index database and copy the old index library, practice pro test effective!
Dynamsoft barcode reader v7.5!
汽车维修app开发的好处与功能
About Devops seven misunderstandings, 99% of people have been hit!
JS array the usage of array is all here (array method reconstruction, array traversal, array de duplication, array judgment and conversion)
20个XR项目路演,近20个资本机构出席!诚邀您参加2020 Qualcomm XR生态合作伙伴大会
消防器材RFID固定资产管理系统
Zhou Jie: database system of East China Normal University
How to write plug-in code of small program mall system? How to use code to check whether the plug-in is successfully added?
python3操作gitlab
Unexpected element.. required element
How to deploy Gantt chart quickly and correctly
如何使用甘特图图层和筛选器
Js数组-数组的用法全在这里(数组方法的重构、数组的遍历、数组的去重,数组的判断与转换)
预留电池接口,内置充放电电路及电量计,迅为助力轻松搞定手持应用