Server & Authentication
login
from tempora import login
login(
host: str | None = None,
username: str | None = None,
password: str | None = None,
use_tls: bool = True,
verify_server: bool = True
) -> None
Login to a Tempora server.
| Parameter Name | Description |
|---|---|
host |
Server host in hostname:port format. Defaults to TEMPORA_SERVER_HOST. |
username |
Username for authentication. Defaults to TEMPORA_SERVER_USERNAME. |
password |
Password for authentication. If omitted, uses TEMPORA_SERVER_PASSWORD. If that is also unset, the user is prompted to enter the password. |
use_tls |
Set to False if the server is running without TLS. |
verify_server |
Set to False to disable server verification when using TLS. |
Notes:
- If
hostomits a port,7070is used.
logout
from tempora import logout
logout() -> None
Logout from the currently authenticated Tempora server.
server_connection
from tempora import server_connection
server_connection(
host: str | None = None,
username: str | None = None,
password: str | None = None,
use_tls: bool = True,
verify_server: bool = True
)
Context manager that logs in on entry and logs out on exit.
| Parameter Name | Description |
|---|---|
host |
Server host in hostname:port format. Defaults to TEMPORA_SERVER_HOST. |
username |
Username for authentication. Defaults to TEMPORA_SERVER_USERNAME. |
password |
Password for authentication. If omitted, uses TEMPORA_SERVER_PASSWORD. If that is also unset, the user is prompted to enter the password. |
use_tls |
Set to False if the server is running without TLS. |
verify_server |
Set to False to disable server verification when using TLS. |
Usage:
from tempora import server_connection
with server_connection():
...
list_datasets
from tempora import list_datasets
list_datasets() -> None
List datasets currently loaded on the server.