jsonrpclib is a Python client library implementing the JSON-RPC v2.0 specification, with backwards compatibility considerations. It focuses on providing client-side functionality for interacting with JSON-RPC servers. The current version is 0.2.1. The project has seen limited updates since 2021; for more active development or server-side functionality, consider `jsonrpclib-pelix`.
pip install jsonrpclibVerified import paths — ran on the pinned version, not inferred.
This example shows how to create a client proxy and call methods on a remote JSON-RPC server. It requires a server to be running at `SERVER_URL` for the calls to succeed. Error handling for connection issues is included.
Ensure your environment is running Python 3.5+ (as per `requires_python` in `setup.py`). Migrate any Python 2 specific code if upgrading from a very old version.
If you need to implement a JSON-RPC server, consider using libraries specifically designed for server-side RPC, such as `jsonrpclib-pelix` (from the same author) or other Python web frameworks with JSON-RPC extensions.
Evaluate `jsonrpclib-pelix` (available on PyPI) as a more actively maintained and feature-rich alternative that also supports server implementations.
Run `pip install jsonrpclib` in your terminal to install the library.
For Python 3, it is recommended to use the `jsonrpclib-pelix` fork. Install it using `pip install jsonrpclib-pelix` and update your imports from `jsonrpclib` to `jsonrpclib_pelix`.
Inspect the raw HTTP response from the server to identify the malformed aspect. Ensure the server is sending valid JSON-RPC 2.0 responses. Check network connectivity or server availability if it's a transport-layer issue.
Consult the server's API documentation to verify the correct method names, required parameters, and their expected types. Ensure your client's request body strictly adheres to the JSON-RPC 2.0 specification for requests.
No dependency data recorded yet.