AZBrand S3 Cloud Storage SDK for Python
Official Python client and CLI tool for AZBrand S3 Cloud Object Storage.
Store, stream, and distribute media, database backups, and large files globally with zero egress bandwidth fees and 100% S3 compatibility.
Features
- Zero Egress Fees: Download unlimited bandwidth without surprise hyperscaler invoices.
- Direct S3 Presigned Uploads: Stream large multi-gigabyte files directly to storage edge nodes.
- Bucket Management: Programmatically create Private Vaults (AES-256), Public CDN Buckets, and Multi-Tenant Shared Workspaces.
- Command-Line Interface: Includes the built-in
azbrand-s3CLI command for bash scripts and automated cron backups. - Full Metadata & Head Inspection: Fast HEAD requests for ETags, Content-Type, and byte counts.
Installation
pip install azbrand-s3
Quick Start (Python)
Generate your API Access Keys from your AZBrand Storage Dashboard.
from azbrand_s3 import AZBrandStorage
storage = AZBrandStorage(
access_key_id="az_ak_YOUR_ACCESS_KEY",
secret_access_key="az_sk_YOUR_SECRET_KEY",
)
# 1. Upload a local file to a bucket
file = storage.upload_file(
bucket="my-backups",
file_source="./database.sql.gz",
file_name="database.sql.gz",
content_type="application/gzip",
)
print("Uploaded File ID:", file["id"])
# 2. List files in a bucket
files = storage.list_files(bucket="my-backups")
for f in files:
print(f" • {f['file_name']} ({f['size_bytes']} bytes)")
# 3. Get a signed temporary download URL (1 hour)
download_url = storage.get_download_url(file["id"])
print("Download Link:", download_url)
# 4. Check account quota and request metrics
metrics = storage.get_usage()
print("Used Bytes:", metrics["used_bytes"])
Command-Line Interface (CLI)
The package installs the azbrand-s3 command globally:
# Set your credentials
export AZ_ACCESS_KEY_ID="az_ak_..."
export AZ_SECRET_ACCESS_KEY="az_sk_..."
# List buckets
azbrand-s3 buckets
# Upload a backup file
azbrand-s3 upload my-backups ./backup.tar.gz
# List files in bucket
azbrand-s3 list my-backups
# Get a signed download link
azbrand-s3 download <FILE_UUID>
# Check storage usage
azbrand-s3 usage
API Reference
Bucket Operations
storage.list_buckets()- List all buckets.storage.create_bucket(name, bucket_type="private")- Create an S3 storage bucket.storage.delete_bucket(bucket_id)- Permanently delete a bucket and its contents.
File Operations
storage.upload_file(bucket, file_source, file_name, content_type)- Direct S3 signed PUT upload.storage.list_files(bucket, query)- Query files with prefix filtering.storage.get_download_url(file_id)- Generate temporary signed S3 download URL.storage.get_metadata(file_id)- Inspect size, ETag, and Content-Type (HEAD).storage.copy_file(source_file_id, target_bucket_id, new_file_name)- Fast server-side S3 copy.storage.delete_file(file_id)- Permanently delete a storage object.storage.share_file(file_id, is_public, expires_in_days)- Create public share link.
Usage
storage.get_usage()- Check storage quota and Class A/B request metrics.
Links & Resources
License
MIT (c) AZBrand Canada
Metadata
Release files for azbrand-s3 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| azbrand_s3-1.0.0.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| azbrand_s3-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.2 kB
Release files / azbrand_s3-1.0.0.tar.gz
| Download URL | azbrand_s3-1.0.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dca999978b413b8a09a8a2c01e74971f5d255e6c27ad9c5acec0abee59b5b3d6
|
|
BLAKE2b-256 checksum How to use checksums |
eb3c464a0f332f385b6e7feea3b4d2aea7c9794db5e525a5c2da502776a50371
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Release files / azbrand_s3-1.0.0-py3-none-any.whl
| Download URL | azbrand_s3-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
276a6a46736b047795fbf75632e107e5aad730e7fc01a0effc2345efddc4d6c7
|
|
BLAKE2b-256 checksum How to use checksums |
3808abd0208c5362f9dd8aaeb606efaf955934ee7c2818dfea0c03b79abb2c30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|