Skip to main content

Quickstart - SDK

Choose your language and follow along. Each example uploads a file and verifies it. Create the bucket first in the dashboardCreateBucket over the S3 API is not available in eu-west-1, the default region these examples use.

The endpoint depends on your bucket's region

These examples use eu-west-1, the default region. For a bucket in us-east-1, use https://us-east-1.s3.filonecontent.com and region us-east-1. The endpoint, the region, and your access key must all refer to the same region.

pip install boto3
import boto3
from botocore.config import Config

s3 = boto3.client(
"s3",
endpoint_url="https://eu-west-1.s3.filonecontent.com",
aws_access_key_id="YOUR_ACCESS_KEY",
aws_secret_access_key="YOUR_SECRET_KEY",
region_name="eu-west-1",
config=Config(s3={"addressing_style": "path"}),
)

# Upload a file (create the bucket first in the dashboard)
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 multipart uploads and presigned URLs, see the dedicated SDK pages: