Amazon AWS S3 adapter for Flask-Imagine extension.
$ pip install Flask-Imagine-S3Adapter
from flask import Flask
from flask.ext.imagine import Imagine
from flask.ext.imagine_s3_adapter import FlaskImagineS3Adapter
app = Flask(__name__)
app.config['IMAGINE_ADAPTERS'] = {
's3': FlaskImagineS3Adapter
}
app.config['IMAGINE_ADAPTER'] = {
'name': 's3',
'access_key': 'your_access_key',
'secret_key': 'your_secret_key',
'bucket_name': 'your_bucket_name',
'domain': 'domain.tld' # Domain name for using ASW S3 static website hosting
'schema': 'https'
}
# ... Another configuration options
# Init extension
imagine = Imagine(app)
# or
imagine = Imagine()
imagine.init_app(app)