Server & Authentication
login
from tempora import login
login(
host: str | None = None,
username: str | None = None,
use_tls: 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. |
use_tls |
Set to False if the server is running without TLS. |
Notes:
- If
TEMPORA_SERVER_PASSWORDis not set, you will be prompted for a password. - 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,
use_tls: 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. |
use_tls |
Set to False if the server is running without 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.