Module promises.xmlrpc

XML RPC MultiCall Promises.

author:Christopher O’Brien <obriencj@gmail.com>
license:LGPL v.3
class promises.xmlrpc.LazyMultiCall(server, group_calls=0)[source]

Bases: object

A wrapper to xmlrpclib.MultiCall which allows the programmer to receive promises for the calls as they are written, rather than having to gather and distribute the results at the end. Forcing a promise to deliver will also force this MultiCall to execute all of its queued xmlrpc calls.

As with all lazy calls, if nothing requests delivery of the promised result, it is possible for the work to never be executed. As such, it is inappropriate to expect the queued calls to be triggered in any particular order, or at all.

When group_calls is greater than zero, queued requests will be collected up to that many at a time, and then a new group will be created for any further calls. Whenever a promise is delivered, it also delivers all queued calls in its group.

This class supports the managed interface API, and as such can be used via the with keyword. The managed interface delivers on all promises when exiting.

class promises.xmlrpc.ProxyMultiCall(server, group_calls=0)[source]

Bases: promises.xmlrpc.LazyMultiCall

A LazyMultiCall which will return Proxy instead of Container style promises.

Previous topic

Module promises.multithread

This Page