Clients needs to be instantiated with a protocol and a transport to function. Proxies are syntactic sugar for using clients.
Client for making RPC calls to connected servers.
Experimental, use at your own peril.
call(method, args, kwargs, one_way=False)¶
Calls the requested method and returns the result.
If an error occured, an
RPCErrorinstance is raised.
- method – Name of the method to call.
- args – Arguments to pass to the method.
- kwargs – Keyword arguments to pass to the method.
- one_way – Whether or not a reply is desired.
Calls the methods in the request in parallel.
geventmodule is already loaded it is assumed to be correctly initialized, including monkey patching if necessary. In that case the RPC calls defined by
requestsis performed in parallel otherwise the methods are called sequentially.
Parameters: requests – A listof either RPCCall or RPCCallTo elements. When RPCCallTo is used each element defines a transport. Otherwise the default transport set when RPCClient is created is used. Returns: A list with replies matching the order of the requests.
RPCProxy(client, prefix='', one_way=False)¶
Create a new remote proxy object.
Proxies allow calling of methods through a simpler interface. See the documentation for an example.
- client – An
- prefix – Prefix to prepend to every method name.
- one_way – Passed to every call of
- client – An