Sync¶
- class SyncAPIMixIn(host=None, port=None, username=None, password=None, api_key=None, EXTRA_HEADERS=None, REQUESTS_ARGS=None, HTTPADAPTER_ARGS=None, VERIFY_WEBUI_CERTIFICATE=True, FORCE_SCHEME_FROM_HOST=False, RAISE_NOTIMPLEMENTEDERROR_FOR_UNIMPLEMENTED_API_ENDPOINTS=False, RAISE_ERROR_FOR_UNSUPPORTED_QBITTORRENT_VERSIONS=False, VERBOSE_RESPONSE_LOGGING=False, SIMPLE_RESPONSES=False, DISABLE_LOGGING_DEBUG_OUTPUT=False) None¶
Bases:
AppAPIMixInImplementation of all
SyncAPI Methods.- Usage:
>>> from qbittorrentapi import Client >>> client = Client(host="localhost:8080", username="admin", password="adminadmin") >>> maindata = client.sync_maindata(rid="...") >>> torrent_peers = client.sync_torrent_peers(torrent_hash="...", rid="...")
- sync_maindata(rid=0, **kwargs) SyncMainDataDictionary¶
Retrieves sync data.
- Parameters:
- Return type:
- sync_torrent_peers(torrent_hash=None, rid=0, **kwargs) SyncTorrentPeersDictionary¶
Retrieves torrent sync data.
- Raises:
- Parameters:
- Return type:
- class Sync(client) None¶
Allows interaction with the
SyncAPI endpoints.- Usage:
>>> from qbittorrentapi import Client >>> client = Client(host="localhost:8080", username="admin", password="adminadmin") >>> # these are all the same attributes that are available as named in the >>> # endpoints or the more pythonic names in Client (with or without 'sync_' prepended) >>> maindata = client.sync.maindata(rid="...") >>> # for use when continuously calling maindata for changes in torrents >>> # this will automatically request the changes since the last call >>> md = client.sync.maindata.delta() >>> # >>> torrentPeers = client.sync.torrentPeers(torrent_hash="...", rid="...") >>> torrent_peers = client.sync.torrent_peers(torrent_hash="...", rid="...")
- class MainData(client) None¶
- __call__(rid=0, **kwargs) SyncMainDataDictionary¶
Call self as a function.
- Return type:
- delta(**kwargs) SyncMainDataDictionary¶
Implements
sync_maindata()to return updates since last call.- Return type:
- class TorrentPeers(client) None¶
- __call__(torrent_hash=None, rid=0, **kwargs) SyncTorrentPeersDictionary¶
Implements
sync_torrent_peers().- Return type:
- delta(torrent_hash=None, **kwargs) SyncTorrentPeersDictionary¶
Implements
sync_torrent_peers()to return updates since last call.- Return type:
- property maindata: MainData¶
Implements
sync_maindata().
- property torrentPeers: TorrentPeers¶
Implements
sync_torrent_peers().
- property torrent_peers: TorrentPeers¶
Implements
sync_torrent_peers().
- class SyncMainDataDictionary(data=None, **kwargs)¶
Bases:
Dictionary[None|int|str|bool|Sequence[JsonValueT] |Mapping[str, JsonValueT]]Response for
sync_maindata()Definition: https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-5.0)#user-content-get-main-data
- class SyncTorrentPeersDictionary(data=None, **kwargs)¶
Bases:
Dictionary[None|int|str|bool|Sequence[JsonValueT] |Mapping[str, JsonValueT]]Response for
sync_torrent_peers()