flask-cos
腾讯云对象存储的Flask扩展, 基于 codeif/qcos
安装
通过pip安装:
pip install flask-cos
使用
from flask_cos import COS
cos = COS()
cos.init_app(app)
key = "test.txt"
data = "content"
cos.put_object(key, data)
配置项
配置项 |
说明 |
|---|---|
COS_SECRET_ID |
|
COS_SECRET_KEY |
|
COS_REGION |
|
COS_APPID |
|
COS_BUCKET |
|
COS_SCHEME |
选填,https或者http,默认https,访问api的协议 |
COS_HOST |
选填,可以通过cos.host设置的值,组成文件静态文件url |
Metadata
Release files for flask-cos 2.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flask_cos-2.1.7.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flask_cos-2.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.7 kB
Release files / flask_cos-2.1.7.tar.gz
| Download URL | flask_cos-2.1.7.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8fe1657c1e41c59e0f024ea1d37f2840cd3580fb5963c82f6b7cb56437314b5
|
|
BLAKE2b-256 checksum How to use checksums |
df2a12910e7b9d359d2aa3d1182c4cab1a24c2c40417be87e26f0cdcff0d06c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.10.13 Darwin/22.3.0
|
Release files / flask_cos-2.1.7-py3-none-any.whl
| Download URL | flask_cos-2.1.7-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bb693afdee119e22cc04052379e5be5a3940765f67209eb03ce38724920cf07
|
|
BLAKE2b-256 checksum How to use checksums |
eb5ee70c580f4326d1747154da7ccffb2b873a59c021ed795fd115121f5b2955
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.10.13 Darwin/22.3.0
|