yera.cli.commands.hub

Hub app commands — upload, run, get, list, and delete apps on a hub.

Symbols

def delete — Delete an app or one of its versions from the hub.
def get — Show one app and its versions as JSON.
def list_apps — List all apps on the hub as JSON.
def run — Run an uploaded app on the hub and stream output.
def upload — Upload an app from a Python file to the hub.

delete

delete(
    app_id: str,
    app_version: int | None = None,
    hub: str | None = None,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Delete an app or one of its versions from the hub.

Parameters

app_id
type: str

App id on the hub.

app_version
type: int | None = None

If set, delete only this version. If omitted, all versions are deleted.

hub
type: str | None = None

Hub name override. Resolution order: this flag, then pyproject.toml [tool.yera] hub, then yera.toml [hubs] default.

get

get(
    app_id: str,
    hub: str | None = None,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Show one app and its versions as JSON.

Parameters

app_id
type: str

App id on the hub.

hub
type: str | None = None

Hub name override. Resolution order: this flag, then pyproject.toml [tool.yera] hub, then yera.toml [hubs] default.

list_apps

list_apps(
    hub: str | None = None,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

List all apps on the hub as JSON.

Parameters

hub
type: str | None = None

Hub name override. Resolution order: this flag, then pyproject.toml [tool.yera] hub, then yera.toml [hubs] default.

run

run(
    app_id: str,
    app_version: int | None = None,
    hub: str | None = None,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Run an uploaded app on the hub and stream output.

Parameters

app_id
type: str

App id on the hub.

app_version
type: int | None = None

Version to run. If omitted, the hub uses the latest version.

hub
type: str | None = None

Hub name override. Resolution order: this flag, then pyproject.toml [tool.yera] hub, then yera.toml [hubs] default.

upload

upload(
    app_path: str,
    app_id: str | None = None,
    hub: str | None = None,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Upload an app from a Python file to the hub.

Parameters

app_path
type: str

Path to the Python file that defines the app.

app_id
type: str | None = None

Hub-side app id override. Defaults to the loaded app's metadata identifier.

hub
type: str | None = None

Hub name override. Resolution order: this flag, then pyproject.toml [tool.yera] hub, then yera.toml [hubs] default.