nodus.volume
View MarkdownVolume: named storage with Modal’s commit and reload semantics for ReadWriteMany (resources.md §5.1, ADR-091).
File transfers go through the kopia client inside the nodus CLI with a storage grant from the Volume’s uploads
subresource, so they run at object-store speed and never proxy bytes through the API.
BatchUpload
Section titled “BatchUpload”class BatchUpload(volume: _Volume) -> NoneBatchUpload.put_directory
Section titled “BatchUpload.put_directory”put_directory(local_path: str | os.PathLike[str], remote_path: str) -> NoneBatchUpload.put_file
Section titled “BatchUpload.put_file”put_file(local_path: str | os.PathLike[str], remote_path: str) -> NoneVolume
Section titled “Volume”class Volume(name: str, *, create_if_missing: bool = False, access_mode: str | None = None, size: str = '50Gi', project: str | None = None, source: Obj | None = None) -> NoneVolume.batch_upload
Section titled “Volume.batch_upload”batch_upload() -> _BatchUploadwith vol.batch_upload() as up: up.put_file(...); up.put_directory(...) uploads as one revision.
Volume.clear
Section titled “Volume.clear”clear() -> NoneCommit an empty revision; the Volume and its history stay.
Volume.commit
Section titled “Volume.commit”commit() -> NoneInside a container that mounts this Volume: publish this attempt’s changed paths as a new revision.
Volume.from_name
Section titled “Volume.from_name”from_name(name: str, create_if_missing: bool = False, access_mode: str | None = None, size: str = '50Gi', project: str | None = None) -> _VolumeA reference resolved on first use; create_if_missing=True creates a ReadWriteMany Volume (as Modal).
Volume.import_from
Section titled “Volume.import_from”import_from(name: str, *, huggingface: str | None = None, revision: str | None = None, git: str | None = None, url: str | None = None, sha256: str | None = None, extract: str = 'auto', s3: str | None = None, connection: str | None = None, query: str | None = None, secret: str | None = None, size: str = '50Gi', project: str | None = None) -> _VolumeCreate a ReadOnlyMany Volume imported from Hugging Face, git, a URL, S3 or a Connection query.
Volume.listdir
Section titled “Volume.listdir”listdir(path: str = '/') -> list[str]Volume.name
Section titled “Volume.name”Type: str
Volume.put_directory
Section titled “Volume.put_directory”put_directory(local_path: str | os.PathLike[str], remote_path: str) -> NoneVolume.put_file
Section titled “Volume.put_file”put_file(local_path: str | os.PathLike[str], remote_path: str) -> NoneVolume.read_file
Section titled “Volume.read_file”read_file(remote_path: str) -> bytesVolume.reload
Section titled “Volume.reload”reload() -> NoneInside a container: remount the latest revision (close open files first).
Volume.remove_file
Section titled “Volume.remove_file”remove_file(path: str) -> NoneVolume.revisions
Section titled “Volume.revisions”revisions() -> list[Obj]