Skip to content

space

konigle.managers.cloud.space

Managers for BentoCloud Space resources.

AsyncSpaceManager

Bases: BaseSpaceManager, BaseAsyncManager

Asynchronous manager for BentoCloud Space resources.

Example
spaces = await client.spaces.list(webapp_id="456")

with open("app.zip", "rb") as f:
    deployment = await client.spaces.deploy(space_id, f)

deployment = await client.spaces.promote(uat_space_id)

__init__(session)

Initialize the AsyncSpaceManager.

PARAMETER DESCRIPTION
session

Asynchronous HTTP session.

TYPE: AsyncSession

deploy(space_id, zip_file, filename='app.zip', display_name=None) async

Upload a ZIP archive and enqueue a deployment.

PARAMETER DESCRIPTION
space_id

ID of the target Space.

TYPE: str

zip_file

File-like object containing the ZIP archive.

TYPE: Union[BytesIO, RawIOBase]

filename

Filename sent in the multipart request.

TYPE: str DEFAULT: 'app.zip'

display_name

Human-readable label for the deployment.

TYPE: Optional[str] DEFAULT: None

RETURNS DESCRIPTION
Deployment

Deployment resource with an embedded job for polling.

promote(uat_space_id) async

Promote the uat space image to production.

PARAMETER DESCRIPTION
uat_space_id

ID of the uat Space to promote from.

TYPE: str

RETURNS DESCRIPTION
Deployment

Deployment resource with an embedded job for polling.

BaseSpaceManager

Shared configuration for Space managers.

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

API base path for Space resources.

filter_class = SpaceFilters class-attribute instance-attribute

Filter model class for Space list operations.

resource_class = Space class-attribute instance-attribute

The resource model class this manager handles.

SpaceManager

Bases: BaseSpaceManager, BaseSyncManager

Synchronous manager for BentoCloud Space resources.

Example
spaces = client.spaces.list(webapp_id="456")

with open("app.zip", "rb") as f:
    deployment = client.spaces.deploy(space_id, f)

deployment = client.spaces.promote(uat_space_id)

__init__(session)

Initialize the SpaceManager.

PARAMETER DESCRIPTION
session

Synchronous HTTP session.

TYPE: SyncSession

deploy(space_id, zip_file, filename='app.zip', display_name=None)

Upload a ZIP archive and enqueue a deployment.

PARAMETER DESCRIPTION
space_id

ID of the target Space.

TYPE: str

zip_file

File-like object containing the ZIP archive.

TYPE: Union[BytesIO, RawIOBase]

filename

Filename sent in the multipart request.

TYPE: str DEFAULT: 'app.zip'

display_name

Human-readable label for the deployment.

TYPE: Optional[str] DEFAULT: None

RETURNS DESCRIPTION
Deployment

Deployment resource with an embedded job for polling.

promote(uat_space_id)

Promote the uat space image to production.

No re-upload is needed — the currently running image tag is copied directly to the paired production space.

PARAMETER DESCRIPTION
uat_space_id

ID of the uat Space to promote from.

TYPE: str

RETURNS DESCRIPTION
Deployment

Deployment resource with an embedded job for polling.