当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Mongo user rights login instruction
- confd
- Cloudquery v1.2.0 release
- Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification
- The essence of transaction and the principle of deadlock
- Count the number of project code lines
- Configuration of AP hotspot on xunwei-imx6ull development board
- Points to be considered when deleting mapping field of index in ES
- 预留电池接口,内置充放电电路及电量计,迅为助力轻松搞定手持应用
- Application of UHF RFID medical blood management system
猜你喜欢
September 3, 2020: naked writing algorithm: loop matrix traversal.
Cloudquery v1.2.0 release
image operating system windows cannot be used on this platform
Stickinengine architecture 11 message queue
New features of vue3
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
.NETCore3.1+Vue.js打造的低代码工作流引擎
超高频RFID医疗血液管理系统应用
[graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform
Qt音视频开发46-视频传输UDP版
随机推荐
三步轻松理解Kerberos协议
Jenkins入门(二)声明式流水线Jenkins Pipeline
STM32F030C6T6兼容替换MM32SPIN05PF
条形码识别性能低,如何优化Dynamsoft Barcode Reader解码性能
August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
Windows 10 Bluetooth management page 'add Bluetooth or other devices' option click no response solution
预留电池接口,内置充放电电路及电量计,迅为助力轻松搞定手持应用
[elastic search engine]
Reserved battery interface, built-in charge and discharge circuit and electricity meter, quickly help easily handle hand-held applications
Application of UHF RFID medical blood management system
2020年新规,微信封号怎么快速解除?
Common mathematical basic formulas of recursive and backtracking algorithms
20个XR项目路演,近20个资本机构出席!诚邀您参加2020 Qualcomm XR生态合作伙伴大会
Big data processing black Technology: revealing the parallel computing technology of Pb level data warehouse gaussdb (DWS)
Stm32f030k6t6 compatible replacement smart mm32f031k6t6
Common syntax corresponding table of mongodb and SQL
条形码识别器Dynamsoft Barcode Reader v7.5全新上线!
python3操作gitlab
How does LeadTools detect, read and write barcodes
What grammar is it? ]