JSON-RPC Proxy¶
-
class
jsonrpc.proxy.
JSONRPCProxy
(host, path='jsonrpc', serviceName=None, *args, **kwargs)[source]¶ A class implementing a JSON-RPC Proxy.
Parameters: There are two ways of instantiating this class: - JSONRPCProxy.from_url(url) – give the absolute url to the JSON-RPC server - JSONRPC(host, path) – break up the url into smaller parts
-
batch_call
(methods)[source]¶ call several methods at once, return a list of (result, error) pairs
Parameters: names – a dictionary { method: (args, kwargs) } Returns: a list of pairs (result, error) where only one is not None
-
-
class
jsonrpc.proxy.
ProxyEvents
(proxy)[source]¶ An event handler for JSONRPCProxy
Allow a subclass to do its own initialization, gets any arguments leftover from __init__
-
IDGen
= 'ca6bcd74f0eecfc3e3aba6f25c5b62df9566edfc'¶ an instance of a class which defines a __get__ method, used to generate a request id
-