Getting Started

Learn the basics with a quick example
View as MarkdownOpen in Claude

This guide walks through common Object Store operations. Before you begin, make sure you’ve configured your client with your credentials.

All examples use the endpoint https://seal.dropboxapi.com and assume you have credentials provided by Dropbox and a bucket. Data is automatically replicated to 2 regions.

Upload an Object

# Upload an object
s3_client.put_object(
Bucket='your-bucket',
Key='documents/document.txt',
Body=b'file content here'
)
# Upload with metadata
s3_client.put_object(
Bucket='your-bucket',
Key='data/config.json',
Body=b'{"setting": "value"}',
ContentType='application/json',
Metadata={'author': 'user123'}
)

Download an Object

# Get object content
response = s3_client.get_object(
Bucket='your-bucket',
Key='documents/document.txt'
)
content = response['Body'].read()
# Get with range
response = s3_client.get_object(
Bucket='your-bucket',
Key='data/large-file.bin',
Range='bytes=0-1023'
)
first_kb = response['Body'].read()

List Objects

List the objects in your bucket:

# List all objects
response = s3_client.list_objects_v2(Bucket='your-bucket')
for obj in response.get('Contents', []):
print(f"{obj['Key']} - {obj['Size']} bytes")
# List with prefix
response = s3_client.list_objects_v2(
Bucket='your-bucket',
Prefix='documents/'
)
for obj in response.get('Contents', []):
print(obj['Key'])

Delete Objects

Delete objects from your bucket:

# Delete a single object
s3_client.delete_object(
Bucket='your-bucket',
Key='documents/document.txt'
)
# Bulk delete
s3_client.delete_objects(
Bucket='your-bucket',
Delete={
'Objects': [
{'Key': 'file1.txt'},
{'Key': 'file2.txt'},
{'Key': 'file3.txt'}
]
}
)

Copy Objects

Copy objects within or between buckets:

# Copy an object
s3_client.copy_object(
CopySource={'Bucket': 'your-bucket', 'Key': 'source.pdf'},
Bucket='your-bucket',
Key='backup/source.pdf'
)

Working with Large Files

For files larger than 100 MB, use multipart uploads for better performance and reliability:

# Create multipart upload
response = s3_client.create_multipart_upload(
Bucket='your-bucket',
Key='large-file.zip'
)
upload_id = response['UploadId']
# Upload parts (example with 2 parts)
part1 = s3_client.upload_part(
Bucket='your-bucket',
Key='large-file.zip',
PartNumber=1,
UploadId=upload_id,
Body=b'part 1 data...'
)
part2 = s3_client.upload_part(
Bucket='your-bucket',
Key='large-file.zip',
PartNumber=2,
UploadId=upload_id,
Body=b'part 2 data...'
)
# Complete the upload
s3_client.complete_multipart_upload(
Bucket='your-bucket',
Key='large-file.zip',
UploadId=upload_id,
MultipartUpload={
'Parts': [
{'ETag': part1['ETag'], 'PartNumber': 1},
{'ETag': part2['ETag'], 'PartNumber': 2}
]
}
)

Next Steps