nexuml.storage.s3¶
nexuml.storage.s3
¶
Small S3-compatible transport used by distributed dataset export/loading.
S3Path
dataclass
¶
Minimal path-like wrapper around an s3:// object key.
S3Client
¶
Lazy boto3 wrapper for the few operations NexuML actually needs.
read_bytes
¶
read_bytes(uri: str | S3Path) -> bytes
Read one object into memory.
Returns:
| Type | Description |
|---|---|
bytes
|
Object bytes. |
upload_file
¶
upload_file(
source: str | Path, destination: str | S3Path
) -> None
Upload one local file to S3.
upload_bytes
¶
upload_bytes(
data: bytes, destination: str | S3Path
) -> None
Upload one in-memory object to S3.
download_file
¶
download_file(
source: str | S3Path, destination: str | Path
) -> None
Download one object to a local path.