s3z
Python

Quick Start

Install

uv add s3z
pip install s3z
pipx install s3z

Quick start

Create a client with your region and credentials:

from s3z import Config, S3Client, CredentialSource

config = Config("us-east-1", CredentialSource.Env)
client = S3Client(config)

Upload local files or directories — they're walked recursively and uploaded in parallel:

results = client.upload(["./data"], "my-bucket", "uploads/")
for r in results:
    print(f"{r.source} → s3://{r.key} ({r.parts} parts)")

Download everything under a prefix to a local directory:

files = client.download("my-bucket", "uploads/", "./out")

List objects:

objects = client.list("my-bucket", "uploads/")
for obj in objects:
    print(f"{obj.key} ({obj.size} bytes)")

S3-compatible backends

Use static_credentials and set a custom endpoint for MinIO, SeaweedFS, Garage, or any S3-compatible backend:

from s3z import Config, S3Client, static_credentials

config = Config(
    "us-east-1",
    static_credentials("access-key", "secret-key"),
    endpoint="http://localhost:9000",
)
client = S3Client(config)

On this page