Skip to main content

Applications

This article refers to SDK version v0.6.0. The current SDK version is N/A.

Mounted at client.applications. Applications and their versions form the catalog that workloads are deployed from, at either scope: creating an application registers its metadata, and creating a version uploads the actual installable artifact. See the Overview for narrative examples, and App Library for the equivalent Panel actions.

Concept

App Library. The catalog in Barbara Panel of every application, Docker or Marketplace, an organization has registered and can deploy to its nodes.

Learn more

ApplicationsResource​

ApplicationsResource(client: BarbaraClient)

list​

list(*, search: Optional[str] = None, size: Optional[int] = None) -> List[Application]

Returns a single page — use paginate() for total or to page through more applications than the server's default page size.

paginate​

paginate(*, search: Optional[str] = None, size: int = 50, from_: int = 0) -> Page

get​

get(application_id: str) -> Application

create​

create(
name: str,
long_description: str,
developer: str,
*,
docker: bool,
short_description: Optional[str] = None,
icon_path: Optional[str] = None,
timeout: Optional[float] = None,
) -> None

timeout overrides the client's default request timeout for this call only — useful when icon_path is large and/or the connection is slow.

update​

update(
application_id: str,
*,
name: str,
developer: str,
long_description: str,
short_description: str,
docker: bool,
) -> None

delete​

delete(application_id: str) -> None

list_versions​

list_versions(
application_id: str,
*,
size: Optional[int] = None,
from_: Optional[int] = None,
sort_column: Optional[str] = None,
sort_order: Optional[str] = None,
) -> List[Dict[str, Any]]

The response wraps the array as {"appVersionList": [...], "total": ...}.

Returns a single page — the server defaults to size=10, so an application with more versions than that will silently omit the rest unless you page through with size/from_, or narrow down with sort_column/sort_order (e.g. the latest version is sort_column="created", sort_order="desc", size=1).

get_version​

get_version(application_id: str, app_version_id: str) -> Dict[str, Any]

create_version​

create_version(
application_id: str,
artifact_path: str,
name: str,
architectures: List[str],
release_notes: List[str],
*,
timeout: Optional[float] = None,
) -> None

timeout overrides the client's default request timeout for this call only — the artifact upload is often the slowest call an application makes.

rename_version​

rename_version(application_id: str, app_version_id: str, name: str) -> None

delete_version​

delete_version(application_id: str, app_version_id: str) -> None

default_services​

default_services(app_version: Dict[str, Any]) -> Tuple[List[Dict[str, Any]], List[Dict[str, Any]]]

Static method: builds the (compose_config, app_secrets) a fresh Marketplace/Model workload needs from a published app version's template (a list_versions/get_version entry), decoding its base64 defaults. Every service in the template must be echoed back on create, so start from this instead of building compose_config/app_secrets by hand.

AsyncApplicationsResource​

AsyncApplicationsResource(client: AsyncBarbaraClient)

list​

list(*, search: Optional[str] = None, size: Optional[int] = None) -> List[Application]

paginate​

paginate(*, search: Optional[str] = None, size: int = 50, from_: int = 0) -> Page

get​

get(application_id: str) -> Application

create​

create(
name: str,
long_description: str,
developer: str,
*,
docker: bool,
short_description: Optional[str] = None,
icon_path: Optional[str] = None,
timeout: Optional[float] = None,
) -> None

update​

update(
application_id: str,
*,
name: str,
developer: str,
long_description: str,
short_description: str,
docker: bool,
) -> None

delete​

delete(application_id: str) -> None

list_versions​

list_versions(
application_id: str,
*,
size: Optional[int] = None,
from_: Optional[int] = None,
sort_column: Optional[str] = None,
sort_order: Optional[str] = None,
) -> List[Dict[str, Any]]

Returns a single page — see the sync list_versions docstring.

get_version​

get_version(application_id: str, app_version_id: str) -> Dict[str, Any]

create_version​

create_version(
application_id: str,
artifact_path: str,
name: str,
architectures: List[str],
release_notes: List[str],
*,
timeout: Optional[float] = None,
) -> None

rename_version​

rename_version(application_id: str, app_version_id: str, name: str) -> None

delete_version​

delete_version(application_id: str, app_version_id: str) -> None

default_services​

default_services(app_version: Dict[str, Any]) -> Tuple[List[Dict[str, Any]], List[Dict[str, Any]]]

Static method: same as the sync default_services above.


Signatures above are generated from barbara-api-sdk 0.6.0 docstrings. If a new SDK release changes one, this page needs a re-sync — the surrounding prose does not update itself.