qiniu file uploader for flask!
Project description
Install
pip install qiniufs
Usage
# init
bucket_name = "your-qiniu-bucket-name"
prefix_url = "your-qiniu-domain"
fs = QiniuFS(bucket_name, access_key, secret_key, prefix_url)
# upload
mime = data.mimetype
r, d = fs.upload_data(data, mime=mime)
if r and d:
key = d.get('key')
url = fs.get_url(d.get('key'))
# delete
r = fs.delete_file(key)
if r:
print "success"
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qiniufs-1.0.2.tar.gz
(2.7 kB
view details)
File details
Details for the file qiniufs-1.0.2.tar.gz
.
File metadata
- Download URL: qiniufs-1.0.2.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f978c012045810d4329a3db5b3ee0c8ab9a58cc6c074eac451d105173d479550 |
|
MD5 | 38aa67bb8d644873a6e7022e5c24c5ef |
|
BLAKE2b-256 | 363ff19e90242ac6f18119f1f448ef8b4f9341ddb1043666a61b6e5690692a83 |