Skip to content

Commit

Permalink
Minor doc updates (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 authored Feb 8, 2023
1 parent 58ac591 commit 2990ba9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
14 changes: 12 additions & 2 deletions docs/source/behavior&configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,25 @@ Untrusted WebUI Certificate
* Failure to do this for will cause connections to qBittorrent to fail.
* As a word of caution, doing this actually does turn off certificate verification. Therefore, for instance, potential man-in-the-middle attacks will not be detected and reported (since the error is suppressed). However, the connection will remain encrypted.

.. code:: python
qbt_client = Client(..., VERIFY_WEBUI_CERTIFICATE=False}
Host, Username and Password
***************************
* These can be provided when instantiating ``Client``
* The authentication credentials can be provided when instantiating ``Client``:
.. code:: python
qbt_client = Client(host="localhost:8080", username='...', password='...')
* The credentials can also be specified after ``Client`` is created but calling ``auth_log_in()`` is not strictly necessary to authenticate the client; this will happen automatically for any API request.
.. code:: python
qbt_client.auth_log_in(username='...', password='...')
* Alternatively, set environment variables:
* Alternatively, the credentials can be specified in environment variables:
* ``QBITTORRENTAPI_HOST``
* ``QBITTORRENTAPI_USERNAME``
Expand Down
7 changes: 6 additions & 1 deletion docs/source/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ This client can be configured to always return only the simple JSON if desired.

.. code:: python
qbt_client = qbittorrentapi.Client(host='localhost:8080', username='admin', password='adminadmin', SIMPLE_RESPONSES=True)
qbt_client = qbittorrentapi.Client(
host='localhost:8080',
username='admin',
password='adminadmin',
SIMPLE_RESPONSES=True,
)
Alternatively, ``SIMPLE_RESPONSES`` can be set to ``True`` to return the simple JSON only for an individual method call.

Expand Down

0 comments on commit 2990ba9

Please sign in to comment.