hopsworks.core.app_api #
AppApi #
Returned by
get_apps #
get_app #
Get an app by name.
| PARAMETER | DESCRIPTION |
|---|---|
name | Name of the app. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
app.App | App object. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the app does not exist or the backend encounters an error. |
create_app #
create_app(
name: str,
app_path: str,
environment: str = "python-app-pipeline",
memory: int = 2048,
cores: float = 1.0,
) -> app.App
Create a new Streamlit app.
Example
import hopsworks
project = hopsworks.login()
apps = project.get_app_api()
app = apps.create_app(
"my_dashboard",
app_path="Resources/app.py",
)
app.run()
print(app.app_url)
| PARAMETER | DESCRIPTION |
|---|---|
name | Name of the app. TYPE: |
app_path | Path to the Streamlit .py file in HopsFS. TYPE: |
environment | Python environment name (default: "python-app-pipeline"). TYPE: |
memory | Memory in MB (default: 2048). TYPE: |
cores | CPU cores (default: 1.0). TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
app.App | The created App object. |