Skip to content

webapp

konigle.managers.cloud.webapp

Managers for BentoCloud WebApp resources.

AsyncWebAppManager

Bases: BaseWebAppManager, BaseAsyncManager

Asynchronous manager for BentoCloud WebApp resources.

Example
webapps = await client.webapps.list(computer_id="123")
data = WebAppCreate(
    computer_id="123",
    name="my-app",
    runtime="python3",
)
webapp, job_id = await client.webapps.create(data)

__init__(session)

Initialize the AsyncWebAppManager.

PARAMETER DESCRIPTION
session

Asynchronous HTTP session.

TYPE: AsyncSession

check_name_availability(name) async

Check whether a webapp name is available.

PARAMETER DESCRIPTION
name

The webapp name slug to check.

TYPE: str

RETURNS DESCRIPTION
bool

True if the name is available, False if already taken.

create(data) async

Create a new web application asynchronously.

PARAMETER DESCRIPTION
data

WebApp creation parameters.

TYPE: WebAppCreate

RETURNS DESCRIPTION
Tuple[WebApp, str]

Tuple of (WebApp resource, job_id string).

BaseWebAppManager

Shared configuration for WebApp managers.

base_path = '/cloud/api/v1/webapps' class-attribute instance-attribute

API base path for WebApp resources.

filter_class = WebAppFilters class-attribute instance-attribute

Filter model class for WebApp list operations.

resource_class = WebApp class-attribute instance-attribute

The resource model class this manager handles.

WebAppManager

Bases: BaseWebAppManager, BaseSyncManager

Synchronous manager for BentoCloud WebApp resources.

Example
webapps = client.webapps.list(computer_id="123")

data = WebAppCreate(
    computer_id="123",
    name="my-app",
    runtime="python3",
)
webapp, job_id = client.webapps.create(data)

__init__(session)

Initialize the WebAppManager.

PARAMETER DESCRIPTION
session

Synchronous HTTP session.

TYPE: SyncSession

check_name_availability(name)

Check whether a webapp name (subdomain) is available.

PARAMETER DESCRIPTION
name

The webapp name slug to check.

TYPE: str

RETURNS DESCRIPTION
bool

True if the name is available, False if already taken.

create(data)

Create a new web application on a computer.

The backend automatically provisions uat and production spaces. The operation is asynchronous — poll the returned job_id to confirm provisioning completes.

PARAMETER DESCRIPTION
data

WebApp creation parameters.

TYPE: WebAppCreate

RETURNS DESCRIPTION
Tuple[WebApp, str]

Tuple of (WebApp resource, job_id string).