Skip to main content

Quickstart - SDK

Choose your language and follow along. Each example creates a bucket, uploads a file, and verifies the upload.

pip install boto3
import boto3

s3 = boto3.client(
"s3",
endpoint_url="https://s3.fil.one",
aws_access_key_id="YOUR_ACCESS_KEY",
aws_secret_access_key="YOUR_SECRET_KEY",
)

# Create a bucket
s3.create_bucket(Bucket="my-sdk-bucket")

# Upload a file
s3.upload_file("my-file.txt", "my-sdk-bucket", "my-file.txt")

# Verify
response = s3.list_objects_v2(Bucket="my-sdk-bucket")
for obj in response.get("Contents", []):
print(f"{obj['Key']} ({obj['Size']} bytes)")

For more detailed examples including Object Lock, multipart uploads, and presigned URLs, see the dedicated SDK pages: