2 merge requests!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...,!14feat: look in all parent dirs for local configs, get_token_for_hostname,...
As an even better alternative, you should use personal access tokens (PAT) to avoid username/password altogether. See below.
### Verify certificate
### Verify certificate
By default, your SSL-Certification is being verified. If you have a test-instance with a self-signed certificate, you'll need to turn off this verification explicitly:
By default, your SSL-Certification is being verified. If you have a test-instance with a self-signed certificate, you'll need to turn off this verification explicitly:
...
@@ -107,6 +109,54 @@ o.logout()
...
@@ -107,6 +109,54 @@ o.logout()
print(f"Session is active: {o.is_session_active()"}
print(f"Session is active: {o.is_session_active()"}
```
```
### Personal access token (PAT)
As an alternative to login every time you run a script, you can create tokens which
* once issued, do **not need username or password**
* are **much longer valid** (default is one year)
***survive restarts** of an openBIS instance
To create a token, you first need a valid session (either through classic login (see above) or by assigning a valid session token:
With `pyBIS 1.17.0`, a lot of caching has been introduced to improve the speed of object lookups that do not change often. If you encounter any problems, you can turn it off like this:
With `pyBIS 1.17.0`, a lot of caching has been introduced to improve the speed of object lookups that do not change often. If you encounter any problems, you can turn it off like this: