Application¶
- class AppAPIMixIn(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:
AuthAPIMixInImplementation of all
ApplicationAPI 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:
- app_cookies(**kwargs) CookieList¶
Retrieve current cookies.
- Return type:
- app_get_directory_content(directory_path=None, with_metadata=None) DirectoryContentList¶
The contents of a directory file path.
- Raises:
NotFound404Error – file path not found or not a directory
- Parameters:
- Return type:
- 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:
- 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:
- app_preferences(**kwargs) ApplicationPreferencesDictionary¶
Retrieve qBittorrent application preferences.
- Return type:
- app_process_info(**kwargs) ProcessInfoDictionary¶
Information about the process running qBittorrent.
This method was introduced with qBittorrent v5.2.0 (Web API v2.15.1).
- Return type:
- app_set_cookies(cookies=None, **kwargs) None¶
Set cookies.
cookies = [ { 'domain': 'example.com', 'path': '/example/path', 'name': 'cookie name', 'value': 'cookie value', 'expirationDate': 1729366667, }, ]
- class Application(*args, client, **kwargs)¶
Allows interaction with
ApplicationAPI 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¶
Implements
app_build_info().
- property cookies: CookieList¶
Implements
app_cookies().
- property default_save_path: str¶
Implements
app_default_save_path().
- get_directory_content(directory_path=None, with_metadata=None) DirectoryContentList¶
Implements
app_get_directory_content().- Return type:
- network_interface_address_list(interface_name='', **kwargs) NetworkInterfaceAddressList¶
Implements
app_network_interface_address_list().- Return type:
- property network_interface_list: NetworkInterfaceList¶
Implements
app_network_interface_list().
- property preferences: ApplicationPreferencesDictionary¶
Implements
app_preferences().
- property process_info: ProcessInfoDictionary¶
Implements
app_process_info().
- send_test_email() None¶
Implements
app_send_test_email().- Return type:
- set_cookies(cookies=None, **kwargs) None¶
Implements
app_set_cookies().- Return type:
- set_preferences(prefs=None, **kwargs) None¶
Implements
app_set_preferences().- Return type:
- shutdown(**kwargs) None¶
Implements
app_shutdown().- Return type:
- property version: str¶
Implements
app_version().
- property web_api_version: str¶
Implements
app_web_api_version().
- class ApplicationPreferencesDictionary(data=None, **kwargs)¶
Bases:
Dictionary[None|int|str|bool|Sequence[JsonValueT] |Mapping[str, JsonValueT]]Response for
app_preferences()
- class BuildInfoDictionary(data=None, **kwargs)¶
Bases:
Dictionary[str|int]Response for
app_build_info()Definition: https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-5.0)#user-content-get-build-info
- class ProcessInfoDictionary(data=None, **kwargs)¶
Bases:
Dictionary[str|int]Response for
app_process_info()
- class DirectoryContentList(list_entries, client=None)¶
-
Response for
app_get_directory_content()
- class Cookie(data=None, **kwargs)¶
Bases:
ListEntryItem in
CookieList
- class CookieList(list_entries, client=None)¶
-
Response for
app_cookies()
- class NetworkInterfaceList(list_entries, client=None)¶
Bases:
List[NetworkInterface]Response for
app_network_interface_list()
- class NetworkInterface(data=None, **kwargs)¶
Bases:
ListEntryItem in
NetworkInterfaceList
- class NetworkInterfaceAddressList(list_entries, client=None)¶
-
Response for
app_network_interface_address_list()