V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
yazoox
V2EX  ›  Python

大家有用过 Python 访问 github 的 API 么?

  •  
  •   yazoox · 2018-04-02 19:03:07 +08:00 via Android · 2441 次点击
    这是一个创建于 2187 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题,跑自动化脚本,

    需要用 Python 访问公司内部 git 的 API,比如创建一个 branch,更改一个配置文件并提交进去。完毕。

    剩下的,然后有对应监视的 Jenkins 会触发 ci 去跑测试。

    楼主找到一个 pygithub 的包,虽然有 API 文档,可是基本没有例子,用起来好头疼。

    有没有兄弟姐妹也有这个类似需求,你们咋解决的?

    3 条回复    2018-04-03 12:22:58 +08:00
    hcymk2
        1
    hcymk2  
       2018-04-02 19:22:13 +08:00
    你是要 git 还是 github 的这个得说清楚。
    yazoox
        2
    yazoox  
    OP
       2018-04-02 20:00:42 +08:00 via Android
    @hcymk2 github
    lioncui
        3
    lioncui  
       2018-04-03 12:22:58 +08:00
    直接 requests 封装一下就好啦,github 作为全世界最优秀的 Restful 设计,还是很优雅的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1009 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:04 · PVG 06:04 · LAX 15:04 · JFK 18:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.