基于python的phabricator api绑定
phabricator-python的Python项目详细描述
python_phabricator
用于phabricator的基于管道的python api
- 目标是基于python,不依赖于Arcanist
- 基于模块的API请求格式(易于扩展)
- 会话令牌被缓存,并考虑到期时间
如何使用
最小配置如下
# The Certificate of your phabricator installation that can be found# under settingsCERT='YOUR_CERTIFICATE_HERE'# The authorized user on behalf of which to make the callUSER='USER_NAME'# The phabricator URL without the PHABPHAB='PHABRICATOR_URL'
- 将settings_sample.py复制为settings.py
- 填写数值
- 您的证书可以在 phabricator安装
msk@msk-ubuntu ~/projects/python_phabricator (master●)$ python Python 2.7.5+ (default, Feb 272014, 19:37:08)[GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license"for more information. >>> from phabricator.paste.query import QueryPaste >>> p= QueryPaste() >>> p.makeRequest() loading token from disk cache Paste Id: PHID-PSTE-klpolzpskydol4lofldl Paste Id: PHID-PSTE-wfankndvvhullmp2rwgj Paste Id: PHID-PSTE-epwflteivngjxxu7d3yb Paste Id: PHID-PSTE-wrnmkkythul4wzm5c7qd