Send JSON-RPC requests
Project description
Send JSON-RPC requests in Python 2.7 and 3.3+.
>>> HTTPServer('http://pets.com/api').request('cat')
'meow'
Full documentation is available at https://jsonrpcclient.readthedocs.org/.
Recent Changes
2.0.1 (2015-09-04)
A major update, which makes way for protocols other than just HTTP.
Importantly, the Server class has been renamed HTTPServer. Adjust your code like this:
>>> from jsonrpcclient.http_server import HTTPServer
>>> server = HTTPServer('http://example.com/api')
The requests module, which is required to send requests over HTTP, will no longer be installed as a dependency. It’s now up to the user to install it like this:
$ pip install jsonrpcclient requests
Three exceptions have been removed: InvalidRequest (out of scope), InvalidResponse (catch jsonschema.ValidationError instead) and ConnectionError (catch the requests module exceptions instead).
Faster validation of response messages.
Requests are now sent and logged with the JSON-RPC parts in the right order, (beginning with 'jsonrpc': 2.0' etc.), which is just nicer to read.
ZeroMQ support added.
Documentation overhauled.
Other fixes and improvements.
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
File details
Details for the file jsonrpcclient-2.0.1.tar.gz
.
File metadata
- Download URL: jsonrpcclient-2.0.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c40b701e50f0a3e2f727cd473613a86751a9692f6439f1c919c68ebd7dd70b78 |
|
MD5 | 944fda91ff15374f66fb3e0242754270 |
|
BLAKE2b-256 | 5c363ea7596389f8dde23a6130cefa7e65ba71b78a6375edc16bda0b1a168e20 |