Sync#
- class SyncAPIMixIn(host=None, port=None, username=None, password=None, EXTRA_HEADERS=None, REQUESTS_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:
AppAPIMixIn
Implementation of all
Sync
API 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
Sync
API 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 SyncMainDataDictionary(data=None, **kwargs)#
Bases:
Dictionary
[Union
[None
,int
,str
,bool
,Sequence
[JsonValueT
],Mapping
[str
,JsonValueT
]]]Response for
sync_maindata()
Definition: https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#user-content-get-main-data