请求跟踪程序api的python接口
rt的Python项目详细描述
rt-请求跟踪器api的python接口
此处描述rest api的python实现:https://rt-wiki.bestpractical.com/wiki/REST
要求
此模块使用以下Python模块:
安装要求可以运行:
pip install -r requirements.txt
许可证
本模块根据GNU通用公共许可v3的条款分发 并由CZ.NIC实验室研发部 nic association-用于.cz的顶级域注册。GNU副本 通用公共许可证与此模块一起分发。
使用量
一个例子胜过千言万语:
>>> import rt >>> tracker = rt.Rt('http://localhost/rt/REST/1.0/', 'user_login', 'user_pass') >>> tracker.login() True >>> map(lambda x: x['id'], tracker.search(Queue='helpdesk', Status='open')) ['ticket/1', 'ticket/2', 'ticket/10', 'ticket/15'] >>> tracker.create_ticket(Queue='helpdesk', \ ... Subject='Coffee (important)', Text='Help I Ran Out of Coffee!') 19 >>> tracker.edit_ticket(19, Requestors='addicted@example.com') True >>> tracker.reply(19, text='Do you know Starbucks?') True >>> tracker.logout() True
请使用docstrings查看如何使用不同的函数。它们是书面的 在重构文本中。您还可以通过运行 make html在文档目录中(需要sphinx)。
官方网站
- 项目站点和问题跟踪:
- https://github.com/CZ-NIC/python-rt
- Git存储库:
- git://github.com/cz-nic/python-rt.git