Search documentation

Type to search the documentation.

Generated API reference

classyak.Volume

yak.Volume

A named, environment-scoped durable Volume.

A named, environment-scoped durable Volume.

open remains a small-file convenience and materializes one file in
memory. Use upload and download for bounded streaming transfers.
Mounted filesystem visibility and staged open writes retain the YAK-113
Preview 0 contract; immediate transfers do not require a later publish.

Python SDK reference · Yak 0.1.19release v0.1.19
provenancec2e8cf7c309abe376f390072b94a9ecd3e633080
property

Volume.name#

Return the stable canonical name.

Return the stable canonical name.

Returns#

str

Return the stable canonical name.

property

Volume.volume_id#

Return the immutable Volume ID.

Return the immutable Volume ID.

Returns#

str

Return the immutable Volume ID.

property

Volume.environment#

Return the owning environment.

Return the owning environment.

Returns#

str

Return the owning environment.

method

Volume.mount#

Configure read-only and sub-path options for one workload mount.

Configure read-only and sub-path options for one workload mount.

Signature
python
mount(*, read_only: bool = False, subpath: Optional[str] = None) -> VolumeMount

Parameters#

NameTypeDefaultDescription
read_onlykeyword-only bool False

Reject mutation through this workload mount.

subpathkeyword-only Optional[str] None

Optional validated durable subtree to expose as the mount root.

Returns#

VolumeMount
No description supplied.
method

Volume.create#

Strictly create a named Volume.

Strictly create a named Volume.

Signature
python
create(name: str, environment: Optional[str] = None) -> 'Volume'

Parameters#

NameTypeDefaultDescription
namepositional-or-keyword str —

Canonical name within the selected environment.

environmentpositional-or-keyword Optional[str] None

Environment to own the Volume, defaulting to development.

Returns#

'Volume'
No description supplied.
method

Volume.get#

Strictly resolve a named Volume without creating it.

Strictly resolve a named Volume without creating it.

Signature
python
get(name: str, environment: Optional[str] = None) -> 'Volume'

Parameters#

NameTypeDefaultDescription
namepositional-or-keyword str —

Canonical Volume name.

environmentpositional-or-keyword Optional[str] None

Environment to search, defaulting to development.

Returns#

'Volume'
No description supplied.
method

Volume.from_name#

Resolve a name, atomically converging concurrent get-or-create callers.

Resolve a name, atomically converging concurrent get-or-create callers.

Signature
python
from_name(name: str, create_if_missing: bool = True, environment: Optional[str] = None) -> 'Volume'

Parameters#

NameTypeDefaultDescription
namepositional-or-keyword str —

Canonical Volume name.

create_if_missingpositional-or-keyword bool True

Create the Volume through the server authority when absent.

environmentpositional-or-keyword Optional[str] None

Environment to search, defaulting to development.

Returns#

'Volume'
No description supplied.
method

Volume.list#

List authorized Volumes in deterministic name/ID order.

List authorized Volumes in deterministic name/ID order.

Signature
python
list(environment: Optional[str] = None) -> list[VolumeInfo]

Parameters#

NameTypeDefaultDescription
environmentpositional-or-keyword Optional[str] None

Environment to list, defaulting to development.

Returns#

list[VolumeInfo]
No description supplied.
method

Volume.info#

Return authoritative current Volume metadata.

Return authoritative current Volume metadata.

Signature
python
info() -> VolumeInfo

Returns#

VolumeInfo
No description supplied.
method

Volume.open#

Open a small-file staged view; use upload/download for large files.

Open a small-file staged view; use upload/download for large files.

Signature
python
open(path: str, mode: str = 'r') -> VolumeFile

Parameters#

NameTypeDefaultDescription
pathpositional-or-keyword str —

Relative file path inside the Volume.

modepositional-or-keyword str 'r'

Supported small-file mode such as r, w or a.

Returns#

VolumeFile
No description supplied.
method

Volume.publish#

Publish staged files one at a time, retaining unfinished staging on failure.

Publish staged files one at a time, retaining unfinished staging on failure.

Signature
python
publish() -> None

Returns#

None
No description supplied.
method

Volume.discard_staged#

Discard client-side mutations that have not been published.

Discard client-side mutations that have not been published.

Signature
python
discard_staged() -> None

Returns#

None
No description supplied.
method

Volume.upload#

Stream a local regular file or deterministic directory tree into the Volume.

Stream a local regular file or deterministic directory tree into the Volume.

Signature
python
upload(local_path: str | os.PathLike[str], remote_path: Optional[str] = None, recursive: bool = False) -> None

Parameters#

NameTypeDefaultDescription
local_pathpositional-or-keyword str | os.PathLike[str] —

Local regular file or directory to transfer.

remote_pathpositional-or-keyword Optional[str] None

Destination file or directory prefix.

recursivepositional-or-keyword bool False

Permit directory traversal and upload regular files below it.

Returns#

None
No description supplied.
method

Volume.download#

Stream one remote file or a file tree into a temporary destination.

Stream one remote file or a file tree into a temporary destination.

Signature
python
download(remote_path: str, local_path: str | os.PathLike[str], recursive: bool = False) -> None

Parameters#

NameTypeDefaultDescription
remote_pathpositional-or-keyword str —

Relative file or directory prefix in the Volume.

local_pathpositional-or-keyword str | os.PathLike[str] —

Local file or directory destination.

recursivepositional-or-keyword bool False

Permit downloading a directory tree.

Returns#

None
No description supplied.
method

Volume.list_files#

List canonical file objects under a relative prefix deterministically.

List canonical file objects under a relative prefix deterministically.

Signature
python
list_files(path: str = '') -> list[VolumeFileInfo]

Parameters#

NameTypeDefaultDescription
pathpositional-or-keyword str ''

Relative prefix to inspect, or an empty string for all files.

Returns#

list[VolumeFileInfo]
No description supplied.
method

Volume.remove#

Remove one regular file or an explicitly requested file prefix.

Remove one regular file or an explicitly requested file prefix.

Signature
python
remove(path: str, recursive: bool = False) -> None

Parameters#

NameTypeDefaultDescription
pathpositional-or-keyword str —

Relative file path or prefix.

recursivepositional-or-keyword bool False

Remove objects below the prefix when true.

Returns#

None
No description supplied.
method

Volume.copy#

Server-side copy one regular file within this Volume.

Server-side copy one regular file within this Volume.

Signature
python
copy(source: str, destination: str, overwrite: bool = False) -> None

Parameters#

NameTypeDefaultDescription
sourcepositional-or-keyword str —

Relative source file path.

destinationpositional-or-keyword str —

Relative destination file path.

overwritepositional-or-keyword bool False

Permit replacing an existing destination.

Returns#

None
No description supplied.
method

Volume.move#

Server-side move one regular file within this Volume.

Server-side move one regular file within this Volume.

Signature
python
move(source: str, destination: str, overwrite: bool = False) -> None

Parameters#

NameTypeDefaultDescription
sourcepositional-or-keyword str —

Relative source file path.

destinationpositional-or-keyword str —

Relative destination file path.

overwritepositional-or-keyword bool False

Permit replacing an existing destination.

Returns#

None
No description supplied.
method

Volume.delete#

Explicitly delete the whole Volume after in-use checks.

Explicitly delete the whole Volume after in-use checks.

Signature
python
delete() -> None

Returns#

None
No description supplied.

Related guides

Volumes
BoundaryPreview limitations
  • This page is generated from the pinned release schema; update the site pin when a new release should be documented.
  • Lifecycle, persistence and operational context belong in the linked handwritten guides.