MultiBase

MultiBase

MultiBase is a class that can be inherited to easily create a class that can send multiple XMLRPC commands in one request, using the xmlrpclib.MultiCall class. RTorrentQuery and TorrentQuery implement this class.

It also overrides several functions like __getattr__ and __call__ to make usage simple:

t = Torrent.query() # Returns a TorrentQuery object which inherits from
                    # MultiBase
t.get_name().get_hash()
t.get_upload_rate()

print t.all()
class multibase.AttributeDictMultiResult[source]

AttributeDictMultiResult is used by MultiBase .all() calls to return data in a somewhat usable manner. It’s basically a dict with an extra feature to access the dict values via .<name> instead of [name].

exception multibase.InvalidConnectionException[source]

Thrown on xmlrpc error.

exception multibase.InvalidTorrentCommandException[source]

Thrown on an invalid command.

exception multibase.InvalidTorrentException[source]

Thrown on xmlrpc error.

class multibase.MultiBase(target, *args)[source]
all(_type=None)[source]

Returns a list of the results.

_type can be ‘list’ or AttributeDictMultiResult.

first(_type=None)[source]

Return the first result.

new_group(*args)[source]

Use this to create a new group. You can chain calls as well.

Table Of Contents

Previous topic

PeerRequester

Next topic

TorrentQuery

This Page