XML-RPC client for asyncio
Project description
Asyncio version of the standard lib xmlrpc
Currently only aioxmlrpc.client, which works like xmlrpc.client but with coroutine is implemented.
Fill free to fork me if you want to implement the server part.
aioxmlrpc is based on httpx for the transport, and just patch the necessary from the python standard library to get it working.
Installation
aioxmlrpc is available on PyPI, it can simply be installed with your favorite tool, example with pip here.
pip install aioxmlrpc
Getting Started
This example show how to print the current version of the 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()
Run the example
poetry run examples/gandi_api_version.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioxmlrpc-0.8.1.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for aioxmlrpc-0.8.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89d287f1c978950676dad1be83699a843aa61b414fe5b37513841405aed5ca31 |
|
MD5 | fec68885e5b85d1100da2361ad997d71 |
|
BLAKE2b-256 | c8bcf188450003a1315aa47b453540c3d50ee79e972d918dd0d729309a0f287e |