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
Built Distribution
File details
Details for the file aioxmlrpc-0.9.0.tar.gz
.
File metadata
- Download URL: aioxmlrpc-0.9.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.0.post1 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe55ae6e24a0fd83671dc871bed0165c2473ea47a04275e7289f03b8123ab76a |
|
MD5 | 9aae11640fcfdc7ef68cdf91becbf141 |
|
BLAKE2b-256 | 58d46ae1a2bc6a7a40f917e04275960d65683ad108029578c00d102cd8f4a717 |
File details
Details for the file aioxmlrpc-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: aioxmlrpc-0.9.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.0.post1 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ba2176a0df8170f1edc484167a61a2f955f711c2693156ff84ac6147ca919b8 |
|
MD5 | 0a9351993573de9deb5a6d38b4672dd7 |
|
BLAKE2b-256 | 12a2c999c9a6172bc65384eba6de630e9a2dcd3190c6dd3f9e2f935e8bc389bc |