Skip to content

hopsworks.app #

App #

Represents a Hopsworks App (Streamlit application).

name property #

name: str

Name of the app.

state property #

state: str

Current state of the app (RUNNING, KILLED, FAILED, STOPPED, etc.).

serving property #

serving: bool

Whether the app is serving (Streamlit health check passed).

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)

app_path property #

app_path: str | None

Path to the Streamlit .py file in HopsFS.

execution_id property #

execution_id: int | None

ID of the current/latest execution.

environment_name property #

environment_name: str | None

Python environment name.

cpu_requested property #

cpu_requested: str | None

Requested CPU cores.

memory_requested property #

memory_requested: str | None

Requested memory.

run #

run(await_serving: bool = True) -> App

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: bool DEFAULT: True

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.

stop #

stop() -> App

Stop the app.

RETURNS DESCRIPTION
App

Self, with updated state.

delete #

delete()

Delete the app entirely.

This stops the app if running and removes the job configuration.

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.