Flask-FS
Simple and easy file storages for Flask
Compatibility
Flask-FS requires Python 2.7/3.4+ 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.6.1 (2018-04-19)
Fix a race condition on local backend directory creation
Proper content type handling on GridFS (thanks to @rclement)
0.6.0 (2018-03-27)
Added copy() and move() operations
delete() now supports directories (or prefixes for key/value stores)
Improve metadata() mime handling
Added explicit ImageField.full(external=False)
0.5.1 (2018-03-12)
Fix local backend list_files() nested directories handling
0.5.0 (2018-03-12)
Added metadata method to Storage to retrieve file metadata
Force boto3 >= 1.4.5 because of API change (lifecycle)
Drop Python 3.3 support
Create parent directories when opening a local file in write mode
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
Metadata
Release files for flask-fs 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flask_fs-0.6.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for flask_fs-0.6.1-py2.py3-none-any.whl |
Release files / flask_fs-0.6.1-py2.py3-none-any.whl
| Download URL | flask_fs-0.6.1-py2.py3-none-any.whl |
|---|---|
| Size | 36.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1404c1c190bb82d25cb4cdc9194ceab8f591987d42844c76e95dbbbd46400d43
|
|
BLAKE2b-256 checksum How to use checksums |
2afb3699763607db381d56ef1b83e4e4aa923b8f0610008b9c8b2265acef9b55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for flask-fs 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.