Log#

class LogAPIMixIn(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 Log API methods.

Usage:
>>> from qbittorrentapi import Client
>>> client = Client(host="localhost:8080", username="admin", password="adminadmin")
>>> client.log_main(info=False)
>>> client.log_peers()
log_main(normal=None, info=None, warning=None, critical=None, last_known_id=None, **kwargs) LogMainList#

Retrieve the qBittorrent log entries. Iterate over returned object.

Parameters:
  • normal (bool | None) – False to exclude normal entries

  • info (bool | None) – False to exclude info entries

  • warning (bool | None) – False to exclude warning entries

  • critical (bool | None) – False to exclude critical entries

  • last_known_id (str | int | None) – only entries with an ID greater than this value will be returned

Return type:

LogMainList

log_peers(last_known_id=None, **kwargs) LogPeersList#

Retrieve qBittorrent peer log.

Parameters:

last_known_id (str | int | None) – only entries with an ID greater than this value will be returned

Return type:

LogPeersList

class Log(client)#

Allows interaction with Log API endpoints.

Usage:
>>> from qbittorrentapi import Client
>>> client = Client(host="localhost:8080", username="admin", password="adminadmin")
>>> # this is all the same attributes that are available as named in the
>>> #  endpoints or the more pythonic names in Client (with or without 'log_' prepended)
>>> log_list = client.log.main()
>>> peers_list = client.log.peers(last_known_id="...")
>>> # can also filter log down with additional attributes
>>> log_info = client.log.main.info(last_known_id=1)
>>> log_warning = client.log.main.warning(last_known_id=1)
peers(last_known_id=None, **kwargs) LogPeersList#

Retrieve qBittorrent peer log.

Parameters:

last_known_id (str | int | None) – only entries with an ID greater than this value will be returned

Return type:

LogPeersList

class LogPeersList(list_entries, client=None)#

Bases: List[LogPeer]

Response for log_peers()

class LogPeer(data=None, **kwargs)#

Bases: ListEntry

Item in LogPeersList

class LogMainList(list_entries, client=None)#

Bases: List[LogEntry]

Response to log_main()

class LogEntry(data=None, **kwargs)#

Bases: ListEntry

Item in LogMainList