Process JSON-RPC requests
Project description
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
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
jsonrpcserver-5.0.9.tar.gz
(14.5 kB
view details)
File details
Details for the file jsonrpcserver-5.0.9.tar.gz
.
File metadata
- Download URL: jsonrpcserver-5.0.9.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a71fb2cfa18541c80935f60987f92755d94d74141248c7438847b96eee5c4482 |
|
MD5 | a408fbf850561e0be7a686970118d838 |
|
BLAKE2b-256 | e33b8d4d4fe8c59a1a4d1e6edd6126ec118b989510fadf262950a5c4f4bca664 |