Skip to main content

workspace

The workspace of a service account: listing its filespaces and linking them.

client.workspace is the Workspace of the service account the client logged in as. Workspace.list_filespaces() lists the filespaces of the workspace, and Workspace.link_filespace() links one and returns its Filespace.

class

lucidlink.Workspace

Workspace()

The workspace of the service account a Client logged in as.

Get it from client.workspace. Several filespaces can be linked at the same time; each link_filespace() returns its own Filespace, usable until it is unlinked.

Once the owning Client is closed, list_filespaces() and link_filespace() raise ClientClosedError.

Workspace example

workspace = client.workspaceprint(workspace.id, workspace.name)for info in workspace.list_filespaces():    print(info.id, info.name)
property

id: str

The workspace ID.

property

linked_filespaces: list[Filespace]

The filespaces linked through this workspace and not yet unlinked.

property

name: str

The workspace name.

method

list_filespaces() -> list[FilespaceInfo]

List the filespaces of the workspace.

Returns

The ID, name and creation time of each filespace.

Raises

Exception

Condition

AuthenticationError

If the service account token expired or was revoked.

AccessDeniedError

If the service account may not list the filespaces of the workspace.

RateLimitedError

If LucidLink services report too many requests.

Condition

If the service account token expired or was revoked.

Condition

If the service account may not list the filespaces of the workspace.

Condition

If LucidLink services report too many requests.

Workspace.list_filespaces example

for info in workspace.list_filespaces():    print(info.name, info.created_at)
method

stop() -> None

Unlink every filespace linked through this workspace.

Each filespace is unlinked as by Filespace.unlink(). Every filespace is unlinked even when one fails, and the failures are raised together afterwards. Filespaces can be linked again afterwards.

Raises

Exception

Condition

LucidLinkErrorGroup

If unlinking one or more filespaces failed, for example their final sync or the close of an open file. Each failure is a member; a FilespaceError member carries the filespace_id of its filespace.

Condition

If unlinking one or more filespaces failed, for example their final sync or the close of an open file. Each failure is a member; a FilespaceError member carries the filespace_id of its filespace.