trulens.dashboard.cli¶
trulens.dashboard.cli
¶
Command-line interface for launching the TruLens dashboard.
The entry point is installed as trulens-dashboard. With no arguments it looks
for a TruLens database in the current directory and serves it:
trulens-dashboard
Classes¶
Functions¶
detect_database_prefix
¶
find_database
¶
Find a TruLens database in directory.
The default database filename is preferred; remaining SQLite files are checked in alphabetical order. Files that do not contain TruLens tables are skipped.
| PARAMETER | DESCRIPTION |
|---|---|
directory
|
Directory to scan.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tuple[str, str]
|
A tuple of the database url and its table prefix. |
| RAISES | DESCRIPTION |
|---|---|
DatabaseNotFoundError
|
No TruLens database was found in |
resolve_database
¶
resolve_database(
directory: Path,
database_url: Optional[str] = None,
database_prefix: Optional[str] = None,
) -> Tuple[str, str]
Resolve the database to serve.
Precedence is explicit database_url, then the TRULENS_DATABASE_URL
environment variable, then discovery within directory.
| PARAMETER | DESCRIPTION |
|---|---|
directory
|
Directory to scan when no url is supplied.
TYPE:
|
database_url
|
Explicit database url. |
database_prefix
|
Explicit table prefix. Detected when not given. |
| RETURNS | DESCRIPTION |
|---|---|
Tuple[str, str]
|
A tuple of the database url and its table prefix. |