Workspaces¶
- class WorkspaceClient(beaker: Beaker)[source]¶
Methods for interacting with Beaker Workspaces. Accessed via the
Beaker.workspace
property.Warning
Do not instantiate this class directly! The
Beaker
client will create one automatically which you can access through the corresponding property.- get(workspace: str | None = None) Workspace [source]¶
- Examples:
>>> with Beaker.from_env() as beaker: ... workspace = beaker.workspace.get(workspace_name)
- Returns:
A
BeakerWorkspace
protobuf object.- Raises:
BeakerWorkspaceNotFound
if the workspace doesn’t exist.
- create(name: str, *, org: Organization | None = None, description: str | None = None) Workspace [source]¶
- update(workspace: Workspace | None = None, *, name: str | None = None, description: str | None = None, archived: bool | None = None, budget: str | None = None, maximum_workspace_priority: BeakerJobPriority | None = None) Workspace [source]¶
- list(*, org: Organization | None = None, author: User | None = None, workload_author: User | None = None, name_or_description: str | None = None, only_archived: bool = False, sort_order: BeakerSortOrder | None = None, sort_field: Literal['created', 'name', 'recent_workload_activity', 'maximum_workload_priority'] = 'name', include_workspace_size: bool = False, limit: int | None = None) Iterable[Workspace] [source]¶