Google Cloud Storage adapter for Flask-Imagine extension.
$ pip install Flask-Imagine-GoogleAdapter
from flask import Flask
from flask.ext.imagine import Imagine
from flask.ext.imagine_google_adapter import FlaskImagineGoogleAdapter
app = Flask(__name__)
app.config['IMAGINE_ADAPTERS'] = {
'gcs': FlaskImagineGoogleCloudAdapter
}
app.config['IMAGINE_ADAPTER'] = {
'name': 'gcs',
'client_id': 'your_access_key',
'client_secret': 'your_secret_key',
'bucket_name': 'your_bucket_name',
'domain': 'domain.tld' # Domain name for using static website hosting
'schema': 'https'
}
# ... Another configuration options
# Init extension
imagine = Imagine(app)
# or
imagine = Imagine()
imagine.init_app(app)