SDK

Drives

`vault.drives` — the workspace's files across groups, and `drive(group)` for one group's.

On this page

class

Signature #

class Drives(transport: VaultTransport, keyring_provider: Callable[[], Keyring], entropy: EntropyMixer, *, workspace_id: str)

vault.drives — the workspace's files across groups, and drive(group) for one group's.

Members #

drive(security_group_id: str) -> Drive #

method

The files of one security group.

list(*, security_group: str | None = None, exam_id: str | None = None, parent_id: str | None = None, include_pending: bool = False, limit: int = 50, cursor: str | None = None) -> Page[DriveNode] #

method

One page of the workspace's nodes — every group this session may list, unless filtered.

iter_all(*, security_group: str | None = None, exam_id: str | None = None, parent_id: str | None = None, include_pending: bool = False, limit: int = 50) -> Iterator[DriveNode] #

method

Every node, across all pages.

get(node_id: str) -> DriveNode #

method

One ready file's index; folders and unfinished uploads answer `NotFoundError`.

name_of(node: DriveNode) -> str #

method

Opens the node's sealed file name.

iter_download(node_id: str) -> Iterator[bytes] #

method

Downloads and decrypts one file lazily, a chunk at a time.

download(node_id: str, destination: str | os.PathLike[str] | BinaryIO | None = None) -> bytes | None #

method

The plaintext bytes, or written to `destination` (a path or a binary file) chunk by chunk.