

This is intended to allow use of this Client only depending on qBittorrent's own Web API documentation. This is also true for the API methods' arguments so, qbt_client.torrents_add(urls='.', save_path='/torrents') and qbt_client.torrents_add(urls='.', savepath='/torrents') are equivalent. So, for example, qbt_client.app_web_api_version() and qbt_client.app_webapiVersion() are equivalent. However, they are all aliased to the endpoint's name as implemented in qBittorrent's Web API. torrents/trackers).Įach namespace endpoint's method name is PEP8-ified. app/version) or an extended Dictionary or List object (e.g. The responses from the API calls are strings (e.g. torrents_info ( status_filter = 'active' ) Replace with one of the eight namespaces (from within the parentheses) above and with a relevant endpoint.įor instance: torrent_list = qbt_client. To use this package to directly access those endpoints: response = qbt_client. The API is separated in to eight namespaces for the API endpoints: logging.getLogger('urllib3').setLevel(logging.INFO).logging.getLogger('requests').setLevel(logging.INFO).logging.getLogger('qbittorrentapi').setLevel(logging.INFO).Instantiate Client with DISABLE_LOGGING_DEBUG_OUTPUT=True or manually disable logging for the relevant packages:.To raise UnimplementedError instead, instantiate Client with RAISE_UNIMPLEMENTEDERROR_FOR_UNIMPLEMENTED_API_ENDPOINTS=True.the Search endpoints were introduced in Web API v2.1.1), there's a debug logger output and None is returned. By default, if a call is made to endpoint that doesn't yet exist on the host (e.g.API Endpoints Not Yet Implemented in the qBittorrent Host.Alternatively, set environment variables PYTHON_QBITTORRENTAPI_HOST, PYTHON_QBITTORRENTAPI_USERNAME and PYTHON_QBITTORRENTAPI_PASSWORD.These can be provided when instantiating Client or calling qbt_th_log_in(username='.', password='.').However, the connection will remain encrypted. Therefore, for instance, potential man-in-the-middle attacks will not be detected and reported (since the error is suppressed). As a word of caution, doing this actually does turn off certificate verification.Failure to do this for will cause connections to qBittorrent to fail.Instantiate Client with VERIFY_WEBUI_CERTIFICATE=False or set environment variable PYTHON_QBITTORRENTAPI_DO_NOT_VERIFY_WEBUI_CERTIFICATE to a non-null value.torrents_add_trackers ) Behavior & Configuration So, qbt_client.torrents_pause instead of qbt_. The Client's methods all document their own description, expected arguments, possible exceptions, and return value.įor best results, use the "most primitive" form of the API call. LoginFailed as e : print ( e ) # display qBittorrent info print ( f 'qBittorrent: )' ) # pause all torrents qbt_client. # therefore, this is not necessary however, you many want to test the provided login credentials.
QBITTORRENT TRACKERS PASSWORD
Client ( host = 'localhost:8080', username = 'admin', password = 'adminadmin' ) # the Client will automatically acquire/maintain a logged in state in line with any request. Getting Started import qbittorrentapi # instantiate a Client using the appropriate WebUI configuration qbt_client = qbittorrentapi. made available outside your network), please do it properly. If the Web API will be exposed to the Internet (i.e.Enable WebUI in qBittorrent: Tools -> Preferences -> Web UI.(These are installed autuomatically using the methods above.) Ensure urllib3, requests, and attrdict are installed.
QBITTORRENT TRACKERS INSTALL

QBITTORRENT TRACKERS FULL
The full qBittorrent Web API specification is documented on their wiki. Python client implementation for qBittorrent Web API.
