Skip to content

zhwei820/jsonrpcclient

 
 

Repository files navigation

jsonrpcclient

PyPI Downloads Coverage Status

Version 3 is out. It's Python 3.5+ only. See the changelog, example usage, and read the updated documentation.

Send JSON-RPC requests in Python.

pip install "jsonrpcclient[requests]"
>>> from jsonrpcclient import request
>>> response = request("http://fruits.com", "get", color="yellow")
>>> response.text
'{"jsonrpc": "2.0", "result": ["banana", "lemon", "mango"], "id": 1}'
>>> response.data.result
['banana', 'lemon', 'mango']

Full documentation is at jsonrpcclient.readthedocs.io.

Testing

pip install "jsonrpcclient[unittest]" mypy
pytest
mypy jsonrpcclient

See also: jsonrpcserver

About

Send JSON-RPC requests in Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%