Skip to content

Commit

Permalink
Add admonition about context managers in sdk.Client reference
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Léobal <[email protected]>
  • Loading branch information
oleobal committed Aug 16, 2023
1 parent 5a681b7 commit 1370803
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions substra/sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ class Client:
Defaults to None.
username (str, optional): Username to authenticate to the Substra platform.
Used in conjunction with a password to generate a token if not given, using the `login` function.
If using username/password, you should use a context manager to ensure the session is terminated:
```
with Client(username, password) as client:
...
```
Not stored.
Defaults to None.
password (str, optional): Password to authenticate to the Substra platform.
Expand Down

0 comments on commit 1370803

Please sign in to comment.