Generated API reference
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.
provenance
c2e8cf7c309abe376f390072b94a9ecd3e633080Volume.name#
Return the stable canonical name.
Return the stable canonical name.
Returns#
strReturn the stable canonical name.
Volume.volume_id#
Return the immutable Volume ID.
Return the immutable Volume ID.
Returns#
strReturn the immutable Volume ID.
Volume.environment#
Return the owning environment.
Return the owning environment.
Returns#
strReturn the owning environment.
Volume.mount#
Configure read-only and sub-path options for one workload mount.
Configure read-only and sub-path options for one workload mount.
mount(*, read_only: bool = False, subpath: Optional[str] = None) -> VolumeMount
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
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#
VolumeMountVolume.create#
Strictly create a named Volume.
Strictly create a named Volume.
create(name: str, environment: Optional[str] = None) -> 'Volume'
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
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'Volume.get#
Strictly resolve a named Volume without creating it.
Strictly resolve a named Volume without creating it.
get(name: str, environment: Optional[str] = None) -> 'Volume'
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
namepositional-or-keyword |
str |
— |
Canonical Volume name. |
environmentpositional-or-keyword |
Optional[str] |
None |
Environment to search, defaulting to development. |
Returns#
'Volume'Volume.from_name#
Resolve a name, atomically converging concurrent get-or-create callers.
Resolve a name, atomically converging concurrent get-or-create callers.
from_name(name: str, create_if_missing: bool = True, environment: Optional[str] = None) -> 'Volume'
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
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'Volume.list#
List authorized Volumes in deterministic name/ID order.
List authorized Volumes in deterministic name/ID order.
list(environment: Optional[str] = None) -> list[VolumeInfo]
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
environmentpositional-or-keyword |
Optional[str] |
None |
Environment to list, defaulting to development. |
Returns#
list[VolumeInfo]Volume.info#
Return authoritative current Volume metadata.
Return authoritative current Volume metadata.
info() -> VolumeInfo
Returns#
VolumeInfoVolume.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.
open(path: str, mode: str = 'r') -> VolumeFile
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
pathpositional-or-keyword |
str |
— |
Relative file path inside the Volume. |
modepositional-or-keyword |
str |
'r' |
Supported small-file mode such as |
Returns#
VolumeFileVolume.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.
publish() -> None
Returns#
NoneVolume.discard_staged#
Discard client-side mutations that have not been published.
Discard client-side mutations that have not been published.
discard_staged() -> None
Returns#
NoneVolume.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.
upload(local_path: str | os.PathLike[str], remote_path: Optional[str] = None, recursive: bool = False) -> None
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
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#
NoneVolume.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.
download(remote_path: str, local_path: str | os.PathLike[str], recursive: bool = False) -> None
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
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#
NoneVolume.list_files#
List canonical file objects under a relative prefix deterministically.
List canonical file objects under a relative prefix deterministically.
list_files(path: str = '') -> list[VolumeFileInfo]
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
pathpositional-or-keyword |
str |
'' |
Relative prefix to inspect, or an empty string for all files. |
Returns#
list[VolumeFileInfo]Volume.remove#
Remove one regular file or an explicitly requested file prefix.
Remove one regular file or an explicitly requested file prefix.
remove(path: str, recursive: bool = False) -> None
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
pathpositional-or-keyword |
str |
— |
Relative file path or prefix. |
recursivepositional-or-keyword |
bool |
False |
Remove objects below the prefix when true. |
Returns#
NoneVolume.copy#
Server-side copy one regular file within this Volume.
Server-side copy one regular file within this Volume.
copy(source: str, destination: str, overwrite: bool = False) -> None
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
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#
NoneVolume.move#
Server-side move one regular file within this Volume.
Server-side move one regular file within this Volume.
move(source: str, destination: str, overwrite: bool = False) -> None
Parameters#
| Name | Type | Default | Description |
|---|---|---|---|
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#
NoneVolume.delete#
Explicitly delete the whole Volume after in-use checks.
Explicitly delete the whole Volume after in-use checks.
delete() -> None
Returns#
NoneRelated guides
- 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.