hopsworks.app #
App #
Represents a Hopsworks Python App.
Returned by
app_url property #
app_url: str | None
URL to the Streamlit UI, or None if not serving.
Example
apps = project.get_app_api()
app = apps.get_app("my_dashboard")
if app.serving:
print(app.app_url)
entrypoint_script property #
entrypoint_script: str | None
Configured Git-backed Streamlit entrypoint script.
public_access property #
public_access: bool
Whether the app is publicly accessible without a Hopsworks login.
public_url property #
public_url: str | None
Public share URL.
None when the app is not public, or when the caller is not a data owner (only data owners receive the share token from the backend).
delete #
delete()
Delete the app entirely.
This stops the app if running and removes the job configuration.
get_logs #
Get stdout and stderr logs for the latest app execution.
| RETURNS | DESCRIPTION |
|---|---|
dict[str, str] | Dictionary with |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.JobExecutionException | If the app has no execution. |
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when retrieving logs. |
get_url #
get_url() -> str
Get URL to view the app in Hopsworks UI.
| RETURNS | DESCRIPTION |
|---|---|
str | The URL to the app page in the Hopsworks UI. |
make_private #
make_private() -> None
Revoke public access.
Every outstanding public link stops working immediately.
make_public #
make_public() -> str | None
Make this Streamlit app reachable without a Hopsworks login.
| RETURNS | DESCRIPTION |
|---|---|
str | None |
|
Danger
Anyone with the link can use the app with the app's own credentials, data access, and secrets. This is not read-only access. Only data owners can enable it, and only Streamlit apps are eligible.
redeploy #
Redeploy the app by rolling its Kubernetes deployment.
This stops the current running execution and starts a new one using the same app configuration and runtime parameters.
| PARAMETER | DESCRIPTION |
|---|---|
await_serving | If True, wait until the app is serving before returning. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
App | Self, with updated state. |
run #
Start the app.
Example
apps = project.get_app_api()
app = apps.get_app("my_dashboard")
app.run()
print(app.app_url)
| PARAMETER | DESCRIPTION |
|---|---|
await_serving | If True, wait until the app is serving before returning. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
App | Self, with updated state. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.JobExecutionException | If the app fails to start or the serving timeout is exceeded. |