Python Json RPC Client

What is an easy way to call json rpc from python?

+6
source share
4 answers
+4
source

There is also a json-rpc library, it supports python2.7, python3.2 +, have no dependencies and are protocol independent.

+2
source

json-wsp (implemented in Ladon) has a python client and a javascript client for browsers.

Ladon (supports both python 2 and 3)

Python client ( Python client can also be used from the shell)

Javascript client

+1
source

you need to create a server and client script. and you must provide a JSONRPCResponseManager and dispatcher.

from jsonrpc import JSONRPCResponseManager, dispatcher

something like @ Request.application Def application: The dispatcher is a dictionary {: callable} dispatcher ["Hi"] = lambda: s

response = JSONRPCResponseManager.handle( request.data, dispatcher) return Response(response.json, mimetype='application/json') 
0
source

Source: https://habr.com/ru/post/1345656/


All Articles