Client ( ** conn_info ) as qbt_client : if qbt_client. auth_log_out () # or use a context manager: with qbittorrentapi. LoginFailed as e : print ( e ) # if the Client will not be long-lived or many Clients may be created # in a relatively short amount of time, be sure to log out: qbt_client. therefore, this is not strictly necessary # however, you may want to test the provided login credentials. ![]() Client ( ** conn_info ) # 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 conn_info = dict ( host = "localhost", port = 8080, username = "admin", password = "adminadmin", ) qbt_client = qbittorrentapi. Install via pip from PyPI python -m pip install qbittorrent-api If the authentication cookie expires, a new one is automatically requested in line with any API call. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |