Skip to main content

A simple storage for Flask based on siilo.

Project description

https://badge.fury.io/py/flask_siilo.png https://travis-ci.org/s-m-i-t-a/flask_siilo.png?branch=master https://pypip.in/d/flask_siilo/badge.png https://coveralls.io/repos/s-m-i-t-a/flask_siilo/badge.png Requirements Status

A simple storage for Flask.

Free software: BSD license

Quickstart

Install flask_siilo:

pip install flask_siilo

In the app you must init the Storage:

from flask import Flask
from flask.ext.siilo import Storage

app = Flask(__name__)
storage = Storage(app)

As default is used siilo.storages.filesystem.FileSystemStorage and you must set DEFAULT_STORAGE_SETTINGS as dict with base_directory keyword:

app.config['DEFAULT_STORAGE_SETTINGS'] = {
    'base_directory': '/foo/bar/baz',
}

Multiple storages

For use with multiple storages you must set name on storage class:

from flask import Flask
from flask.ext.siilo import Storage

app = Flask(__name__)
default_storage = Storage(app)
foo_storage = Storage(app, name='foo')

and set FOO_STORAGE_SETTINGS:

app.config['FOO_STORAGE_SETTINGS'] = {
    'base_directory': '/foo/bar',
}

Settings

Storage classes

DEFAULT_STORAGE_CLASS (or SOMETHING_STORAGE_CLASS)

  • siilo.storages.amazon_s3.AmazonS3Storage
  • siilo.storages.filesystem.FileSystemStorage

DEFAULT_STORAGE_SETTINGS (or SOMETHING_STORAGE_SETTINGS)

History

0.1.0 (2014-10-21)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
flask_siilo-0.1.2-py2.py3-none-any.whl (4.6 kB) Copy SHA256 hash SHA256 Wheel 3.5 Jan 12, 2016
flask_siilo-0.1.2.tar.gz (12.5 kB) Copy SHA256 hash SHA256 Source None Jan 12, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page