Skip to content

Storages

The amsdal_storages plugin extends AMSDAL's built-in file storage system with cloud storage backends. AMSDAL Framework ships with two storage backends out of the box — this plugin adds support for Amazon S3 and S3-compatible services.

Available Backends

Backend Package Status
Database (DBStorage) amsdal_models (built-in) Stable
Local filesystem (FileSystemStorage) amsdal (built-in) Stable
Amazon S3 / S3-compatible (S3Storage) amsdal_storages (this plugin) Stable
Google Cloud Storage Planned
Azure Blob Storage Planned

Installation

pip install amsdal_storages[s3]

Quick Start

from amsdal_storages.s3 import S3Storage
from amsdal.storages import set_default_storage

# Create an S3-backed storage
storage = S3Storage(bucket='my-bucket', region_name='us-east-1')

# Set it as the default storage for all File fields
set_default_storage(storage)

Once the default storage is set, any File field on your models will automatically use S3 for uploads and downloads.

See the S3 Configuration page for detailed setup options, environment variables, and usage examples.