Application#

class AppAPIMixIn(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: AuthAPIMixIn

Implementation of all Application API methods.

Usage:
>>> from qbittorrentapi import Client
>>> client = Client(host="localhost:8080", username="admin", password="adminadmin")
>>> client.app_version()
>>> client.app_preferences()
app_build_info(**kwargs) BuildInfoDictionary#

qBittorrent build info.

This method was introduced with qBittorrent v4.2.0 (Web API v2.3).

Return type:

BuildInfoDictionary

app_default_save_path(**kwargs) str#

The default path where torrents are saved.

Return type:

str

app_network_interface_address_list(interface_name='', **kwargs) NetworkInterfaceAddressList#

The addresses for a network interface; omit name for all addresses.

This method was introduced with qBittorrent v4.2.0 (Web API v2.3).

Parameters:

interface_name (str) – Name of interface to retrieve addresses for

Return type:

NetworkInterfaceAddressList

app_network_interface_list(**kwargs) NetworkInterfaceList#

The list of network interfaces on the host.

This method was introduced with qBittorrent v4.2.0 (Web API v2.3).

Return type:

NetworkInterfaceList

app_preferences(**kwargs) ApplicationPreferencesDictionary#

Retrieve qBittorrent application preferences.

Return type:

ApplicationPreferencesDictionary

app_set_preferences(prefs=None, **kwargs) None#

Set one or more preferences in qBittorrent application.

Parameters:

prefs (Optional[Mapping[str, Any]]) – dictionary of preferences to set

Return type:

None

app_shutdown(**kwargs) None#

Shutdown qBittorrent.

Return type:

None

app_version(**kwargs) str#

qBittorrent application version.

Return type:

str

app_web_api_version(**kwargs) str#

qBittorrent Web API version.

Return type:

str

class Application(*args, client, **kwargs)#

Allows interaction with Application 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 'app_' prepended)
>>> webapiVersion = client.application.webapiVersion
>>> web_api_version = client.application.web_api_version
>>> app_web_api_version = client.application.web_api_version
>>> # access and set preferences as attributes
>>> is_dht_enabled = client.application.preferences.dht
>>> # supports sending a just subset of preferences to update
>>> client.application.preferences = dict(dht=(not is_dht_enabled))
>>> prefs = client.application.preferences
>>> prefs["web_ui_clickjacking_protection_enabled"] = True
>>> client.app.preferences = prefs
>>>
>>> client.application.shutdown()
property build_info: BuildInfoDictionary#

qBittorrent build info.

This method was introduced with qBittorrent v4.2.0 (Web API v2.3).

property default_save_path: str#

The default path where torrents are saved.

network_interface_address_list(interface_name='', **kwargs) NetworkInterfaceAddressList#

The addresses for a network interface; omit name for all addresses.

This method was introduced with qBittorrent v4.2.0 (Web API v2.3).

Parameters:

interface_name (str) – Name of interface to retrieve addresses for

Return type:

NetworkInterfaceAddressList

property network_interface_list: NetworkInterfaceList#

The list of network interfaces on the host.

This method was introduced with qBittorrent v4.2.0 (Web API v2.3).

property preferences: ApplicationPreferencesDictionary#

Retrieve qBittorrent application preferences.

set_preferences(prefs=None, **kwargs) None#

Set one or more preferences in qBittorrent application.

Parameters:

prefs (Optional[Mapping[str, Any]]) – dictionary of preferences to set

Return type:

None

shutdown(**kwargs) None#

Shutdown qBittorrent.

Return type:

None

property version: str#

qBittorrent application version.

property web_api_version: str#

qBittorrent Web API version.

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

Bases: Dictionary[Union[None, int, str, bool, Sequence[JsonValueT], Mapping[str, JsonValueT]]]

Response for app_preferences()

Definition: https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#user-content-get-application-preferences

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

Bases: Dictionary[Union[str, int]]

Response for app_build_info()

Definition: https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#user-content-get-build-info

class NetworkInterfaceList(list_entries, client=None)#

Bases: List[NetworkInterface]

Response for app_network_interface_list()

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

Bases: ListEntry

Item in NetworkInterfaceList

class NetworkInterfaceAddressList(list_entries, client=None)#

Bases: List[str]

Response for app_network_interface_address_list()