易于与github api通信的python包装器
githubA的Python项目详细描述
python包可以方便地使用github api。
安装
使用pip3 install githubAPy
使用量
- 导入类
from githubAPy import gapy
- 创建一个对象并传递github访问令牌
a = gapy('<access_token_here>')
支持多种操作
a.me
以dict(json)格式返回信息。a.user('<username>')
返回用户信息。a.create_fork('<owner>', '<repository>')
创建指定存储库的fork,如果fork成功创建,则返回fork存储库的url,否则引发错误。a.update_with_upstream('<owner>', '<repository>')
使用上游主存储库更新分叉存储库主存储库。如果更新成功,则返回True
,否则会引发错误。
更多功能将在以后的版本中添加。