A lightweight Qiniu Python SDK. github: https://github.com/fy0/qiniu-lite
Project description
# coding:utf-8
import tornado.ioloop
import tornado.web
from qiniu_lite import Cow
cow = Cow('access key', 'secret key')
policy = cow.get_put_policy('bucket name')
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write('''
<html><body>
<form method="post" action="http://upload.qiniu.com/" enctype="multipart/form-data">
<input name="token" type="hidden" value="%s">
<input name="file" type="file" />
<input name="accept" type="hidden" />
<input type="submit" value="涓婁紶" />
</form>
</body></html>''' % policy.token())
if __name__ == "__main__":
application = tornado.web.Application([
(r"/", MainHandler),
])
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()
import tornado.ioloop
import tornado.web
from qiniu_lite import Cow
cow = Cow('access key', 'secret key')
policy = cow.get_put_policy('bucket name')
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write('''
<html><body>
<form method="post" action="http://upload.qiniu.com/" enctype="multipart/form-data">
<input name="token" type="hidden" value="%s">
<input name="file" type="file" />
<input name="accept" type="hidden" />
<input type="submit" value="涓婁紶" />
</form>
</body></html>''' % policy.token())
if __name__ == "__main__":
application = tornado.web.Application([
(r"/", MainHandler),
])
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qiniu_lite-1.0.1-py3-none-any.whl.
File metadata
- Download URL: qiniu_lite-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef8a6d41501f47e2ba460d7d7088fb779417d684d5d84f745f043f1deb7aa7f0
|
|
| MD5 |
7f90bb5880b2d396594012694b1a40c0
|
|
| BLAKE2b-256 |
96bb0f41445e477b673083339f4b4b5c6ffc51ac2853568951c30ce51eae624f
|