异步的XML-RPC客户端
aioxmlrpc的Python项目详细描述
开始
异步版本的标准库xmlrpc
目前只有aioxmlrpc.client,其工作方式类似于xmlrpc.client,但是 与协程一起实现。
如果您想实现服务器部分,请随意使用fork。
aioxmlrpc基于用于传输的aiohttp,只需修补 从python标准库中获取使其正常工作所必需的。
安装
pip install aioxmlrpc
用法示例
这个例子展示了如何打印gandi xml-rpc api的当前版本。
import asyncio from aioxmlrpc.client import ServerProxy @asyncio.coroutine def print_gandi_api_version(): api = ServerProxy('https://rpc.gandi.net/xmlrpc/') result = yield from api.version.info() print(result) if __name__ == '__main__': loop = asyncio.get_event_loop() loop.run_until_complete(print_gandi_api_version()) loop.stop()
更改日志
0.5发布于2017年9月10日
- Remove compatibility with aiohttp < 1.0 (Ovv)
0.4于2017年3月30日发布
- Fix NXDOMAIN Exception handling (Vladimir Rutsky)
- Fix cancel of futures handling (Gustavo Tavares Cabral)
2016-06-16发布0.3
- Fix socket closing issue
2016-05-26发布0.2
- Update compatibility for aiohttp >= 0.20
Important
This break the compatibility of python 3.3
0.1于2014-05-17发布
- Initial version implementing ^{tt2}$