skip to navigation
skip to content

flask-fs 0.4.1

Simple and easy file storages for Flask

Simple and easy file storages for Flask

Compatibility

Flask-FS requires Python 2.7+ and Flask 0.10+.

Amazon S3 support requires Boto3.

GridFS support requires PyMongo 3+.

OpenStack Swift support requires python-swift-client.

Installation

You can install Flask-FS with pip:

$ pip install flask-fs
# or
$ pip install flask-fs[s3]  # For Amazon S3 backend support
$ pip install flask-fs[swift]  # For OpenStack swift backend support
$ pip install flask-fs[gridfs]  # For GridFS backend support
$ pip install flask-fs[all]  # To include all dependencies for all backends

Quick start

from flask import Flask
import flask_fs as fs

app = Flask(__name__)
fs.init_app(app)

images = fs.Storage('images')


if __name__ == '__main__':
    app.run(debug=True)

Documentation

The full documentation is hosted on Read the Docs

Changelog

0.4.1 (2017-06-24)

  • Fix broken packaging for Python 2.7

0.4.0 (2017-06-24)

  • Added backend level configuration FS_{BACKEND_NAME}_{KEY}
  • Improved backend documentation
  • Use setuptools entry points to register backends.
  • Added NONE extensions specification
  • Added list_files to Storage to list the current bucket files
  • Image optimization preserve file type as much as possible
  • Ensure images are not overwritted before rerendering

0.3.0 (2017-03-05)

  • Switch to pytest
  • ImageField optimization/compression. Resized images are now compressed. Default image can also be optimized on upload with FS_IMAGES_OPTIMIZE = True or by specifying optimize=True as field parameter.
  • ImageField has now the ability to rerender images with the rerender() method.

0.2.1 (2017-01-17)

  • Expose Python 3 compatibility

0.2.0 (2016-10-11)

  • Proper github publication
  • Initial S3, GridFS and Swift backend implementations
  • Python 3 fixes

0.1 (2015-04-07)

  • Initial release
 
File Type Py Version Uploaded on Size
flask_fs-0.4.1-py2.py3-none-any.whl (md5) Python Wheel 3.6 2017-06-24 32KB