A transport-agnostic json-rpc client library
Project description
jsonrpc_pyclient is a transport-agnostic json-rpc 2.0 and 1.0 client library primarily intended for use with libjson-rpc-cpp but can be used with other json-rpc server implementations.
This library is intended to be used with libjson-rpc-cpp’s stubgenerator, which takes a json-formatted specification file, and can then return server and client stubs in various languages; the python client stub generator was created to use this library. For more information on using the stubgenerator, refer to libjson-rpc-cpp’s documentation.
Currently Supported Transports
http
tcp sockets
Basic Usage
>>> from jsonrpc_pyclient.connectors import socketclient
>>> import ClientStub #client stub created by libjson-rpc-cpp stubgenerator
>>> connector = socketclient.TcpSocketClient("127.0.0.1", 8032)
>>> client = ClientStub(connector)
>>> result = client.addNumbers(4, 5)
>>> print(result)
Installation
$ pip install jsonrpc_pyclient
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jsonrpc_pyclient-1.0.2.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for jsonrpc_pyclient-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a9abfae69b80a1e18e7f76300106025a5fa6ad8b35901f6600af23031753a6c |
|
MD5 | 7d46cb4974b006470e3c0a5de2c24119 |
|
BLAKE2b-256 | 81f015f02eb289749dbebf495a66379fbe83922f0cab77bf948bdfe01cd8312b |