Skip to content

Python SDK - Workspace

askanna.workspace.get

import askanna

workspace = askanna.workspace.get(workspace_suuid="{WORKSPACE_SUUID}")

Parameters

Name Type Required Description
workspace_suuid String Yes SUUID of the workspace you want to get the info from

Output

Dataclass: Workspace

askanna.workspace.list

import askanna

workspace_list = askanna.workspace.list()

Parameters

Name Type Required Description
limit Integer No Limit the number of workspaces in the result. Defaults to 100.
offset Integer No Offset the number of workspaces in the result. Defaults to 0.
ordering String No Sets the ordering of the workspace list. Defaults to "-created"

Output

List with elements with Dataclass: Workspace

askanna.workspace.create

import askanna

workspace = askanna.workspace.create(name="{WORKSPACE_NAME}")

Parameters

Name Type Required Description
name String Yes Name for the new workspace
description String No Description for the new workspace. Defaults to an empty description.
visibility String No Visibility of the new workspace. Allowed values are "PRIVATE" and "PUBLIC". Defaults to "PRIVATE".

Output

Dataclass: Workspace

askanna.workspace.change

import askanna

workspace = askanna.workspace.change(workspace_suuid="{WORKSPACE_SUUID}", name="{NEW_NAME}")

Parameters

Name Type Required Description
workspace_suuid String Yes SUUID of the workspace you want to change
name String No New name for the workspace. Defaults to None (do not change).
description String No New description for the workspace. Defaults to None (do not change).
visibility String No Visibility of the workspace. Allowed values are "PRIVATE", "PUBLIC" or None. Defaults to None (do not change).

To change workspace info, at least we need a new name, description or visibility

Output

Dataclass: Workspace

askanna.workspace.delete

import askanna

askanna.workspace.delete(workspace_suuid="{WORKSPACE_SUUID}")

Parameters

Name Type Required Description
workspace_suuid String Yes SUUID of the workspace you want to delete

Output

Bool: True if the workspace is succesfully deleted