Skip to content

Workspaces

A workspace holds datasets, and each training run and pipeline run belongs to one. The SDK’s resource is client.workspaces; client.projects is its old name and the same object. The API still calls a workspace a project, so ids and fields are named project_id.

from qualia import Qualia
client = Qualia()
project = client.workspaces.create(
name="My Project",
description="Optional description",
)

Response

ProjectCreateResult
{
"created": true,
"project_id": "123e4567-e89b-12d3-a456-426614174000"
}

List your projects, a page at a time. Each says whether it is the organization’s default, its icon, and your role there.

page = client.workspaces.list(limit=20)
for project in page.items:
print(project.name, project.is_default, project.my_role)
next_page = client.workspaces.list(cursor=page.page_info.end_cursor)

Response

PaginatedPage[ProjectSummary]
{
"items": [
{
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My Project",
"description": "Optional description",
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-16T08:00:00Z",
"is_default": true,
"icon": null,
"my_role": "contributor"
}
],
"page_info": { "has_next": false, "end_cursor": null, "total_count": 1 }
}

my_role is viewer, contributor, admin or owner. For an API key it is its creator’s; the key’s scopes cap what it may do.

project = client.workspaces.get(project.project_id)

Returns one ProjectSummary, the shape of a list item.

Rename a project, or change its description or icon. Only what you pass changes; description=None (or "") empties it and icon=None removes the icon.

project = client.workspaces.update(
project.project_id,
name="Arms",
description="Upper-body teleop",
)

It takes what the dashboard’s workspace settings take: a contributor, admin or owner of the organization. A key needs projects:write and must not be restricted to workspaces. Returns the project as it is now.

Remove a project. This will fail if the project has active jobs.

client.workspaces.delete(project.project_id)

Response

ProjectDeleteResult
{
"deleted": true,
"project_id": "123e4567-e89b-12d3-a456-426614174000"
}