跳转到主要内容

为Flask提供简单易用的文件存储

项目描述

为Flask提供简单易用的文件桶

兼容性

Flask-Buckets需要Python 2.7+和Flask 0.10+。

Amazon S3支持需要Boto。

OpenStack Swift支持需要python-swift-client。

GridFS支持需要PyMongo。

安装

您可以使用pip安装Flask-Buckets

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

或使用easy_install

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

快速入门

TODO:使用Flask-Buckets的快速入门示例

from flask import Flask
from flask.ext import buckets

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

images = buckets.Bucket('images')


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

文档

完整的文档托管在Read the Docs

变更日志

当前

  • 初始版本

项目详情


支持者:

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面