Skip to main content
The S3 sub-client provides access to the IYREE S3-compatible object storage. Management operations go through the gateway; data operations use presigned URLs to interact with S3 directly.

Methods

list_objects

List objects under a prefix (single page). For auto-pagination, use list_objects_iter.

Parameters

str
default:"\"\""
Key prefix filter. Only objects whose keys start with this prefix are returned.
int
default:"1000"
Maximum number of keys per page.
str
Token from a previous page for pagination. Use page.next_continuation_token.

Returns S3ListResult

List[S3Object]
Objects in this page.
str
Token for fetching the next page, or None if this is the last page.
bool
Whether more pages are available.
int
Number of keys returned in this page.

list_objects_iter

Auto-paginating iterator over all S3 objects matching a prefix. Handles pagination automatically.

Parameters

str
default:"\"\""
Key prefix filter.
int
default:"1000"
Maximum number of keys per page (controls internal page size).

Yields S3Object

Yields individual S3Object instances across all pages.

upload_object

Upload an object using a presigned PUT URL.

Parameters

str
required
Destination object key (the “path” in the bucket).
bytes | str | BinaryIO
required
Upload payload. Strings are UTF-8 encoded. File-like objects are read to bytes.
str
default:"\"application/octet-stream\""
MIME type of the object.

Returns None

Errors


download_object

Download an object and return its contents as bytes.

Parameters

str
required
Object key to download.

Returns bytes

The object contents.

Errors


download_object_to_file

Download an object and stream it directly to a local file. Memory-efficient for large files.

Parameters

str
required
Object key to download.
str | Path
required
Local file path to write to. Parent directories must exist.

Returns None

Errors


copy_object

Copy an object within the bucket.

Parameters

str
required
Key of the source object.
str
required
Key for the destination copy.

Returns S3CopyResult

str
The source object key.
str
The destination object key.

delete_objects

Delete one or more objects in a single request. Partial failures are returned in the result — no exception is raised.

Parameters

List[str]
required
List of object keys to delete.

Returns S3DeleteResult

List[str]
Keys that were successfully deleted.
List[S3DeleteError]
Errors for objects that could not be deleted.

upload_dataframe

Upload a pandas DataFrame as CSV or Parquet. Requires iyree[pandas].

Parameters

str
required
Destination object key.
pd.DataFrame
required
The DataFrame to upload.
str
default:"\"csv\""
Output format: "csv" or "parquet".

Returns None

Errors


Examples