Log

class LogAPIMixIn(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: 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)
class Main(*args, client, **kwargs)
__call__(normal=True, info=True, warning=True, critical=True, last_known_id=None, **kwargs) LogMainList

Implements log_main().

Return type:

LogMainList

critical(last_known_id=None, **kwargs) LogMainList

Implements log_main() with info=False, normal=False, and warning=False.

Return type:

LogMainList

info(last_known_id=None, **kwargs) LogMainList

Implements log_main().

Return type:

LogMainList

normal(last_known_id=None, **kwargs) LogMainList

Implements log_main() with info=False.

Return type:

LogMainList

warning(last_known_id=None, **kwargs) LogMainList

Implements log_main() with info=False and normal=False.

Return type:

LogMainList

property main: Main

Implements log_main().

peers(last_known_id=None, **kwargs) LogPeersList

Implements log_peers().

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