Skip to main content

Minio Client extension for Flask

Project description

flask_minioclient帮助文档

简介

对 minio 库进行包装,需要在 Flask 配置文件或对象创建时配置以下参数:

  • 请求终端: MINIO_ENDPOINT/endpoint
  • 访问账号:MINIO_ACCESS_KEY/access_key
  • 访问密码:MINIO_SECRET_KEY/secret_key
  • 其它信息:secure/region/http_client

安装

    pip install flask-minioclient

使用

    from flask_minioclient import MinioClient

    minio = MinioClient(endpoint='minio:9000',access_key='xxx', secret_key='xxx')

    # 创建 Flask 应用时集成扩展
    def create_app():
        app = Flask(__name__)
        minio.init_app(app)

    # app 中使用
    res = minio.connection.make_bucket('bucket_name')

License

MIT

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

Flask-MinioClient-1.0.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

Flask_MinioClient-1.0-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page