Process incoming JSON-RPC requests in Python.
from jsonrpcserver import method, serve, Success
@method
def ping():
return Success("pong")
if __name__ == "__main__":
serve()
Or use dispatch instead of serve:
response = dispatch('{"jsonrpc": "2.0", "method": "ping", "id": 1}')
# => '{"jsonrpc": "2.0", "result": "pong", "id": 1}'
Watch a video on how to use it.
Full documentation is at jsonrpcserver.com.
See also: jsonrpcclient
Release files for jsonrpcserver 5.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jsonrpcserver-5.0.9.tar.gz | 14.5 kB | Details |
Release files / jsonrpcserver-5.0.9.tar.gz
| Download URL | jsonrpcserver-5.0.9.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a71fb2cfa18541c80935f60987f92755d94d74141248c7438847b96eee5c4482
|
|
BLAKE2b-256 checksum How to use checksums |
e33b8d4d4fe8c59a1a4d1e6edd6126ec118b989510fadf262950a5c4f4bca664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.12
|