| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
通过pip
$ pip install qiniu| Qiniu SDK版本 | Python 版本 |
|---|---|
| 7.x | 2.6, 2.7, 3.3, 3.4, 3.5 |
| 6.x | 2.6, 2.7 |
import qiniu
...
q = qiniu.Auth(access_key, secret_key)
key = 'hello'
data = 'hello qiniu!'
token = q.upload_token(bucket_name)
ret, info = qiniu.put_data(token, key, data)
if ret is not None:
print('All is OK')
else:
print(info) # error message in info
...更多参见SDK使用指南: http://developer.qiniu.com/code/v7/sdk/python.html
安装完后附带有命令行工具,可以计算etag
$ qiniupy etag yourfile$ py.test详情参考代码提交指南。
The MIT License (MIT).详情见 License文件.
| Back | FazBrowse Home | New Git URL |