Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

53iq cloud store

Project Description

ebcloudstore is a sdk for 53iq cloud

hello,world

from ebcloudstore.client import EbStore
store = EbStore("your token")
r = store.upload("/your/file/path/hello.jpg")
print(r)

use in tornado

def post(self):
    if len(self.request.files) > 0:
        file_metas = self.request.files["myfile"]
        for meta in file_metas:
            from ebcloudstore.client import EbStore
            store = EbStore("your token")
            r = store.upload(meta['body'], meta['filename'], meta["content_type"])
            self.write(r)

use in django

def test(request):
    if request.method == "POST":
        if len(request.FILES.dict()) >= 1:
            f = request.FILES["myfile"]
            from ebcloudstore.client import EbStore
            store = EbStore("your token")
            r = store.upload(f.read(), f.name, f.content_type)
            return HttpResponse(r)

callback after finished

from ebcloudstore.client import EbStore
# will post the body data result to callback_url when upload finished (5 seconds timeout)
store = EbStore("your token",action="callback",callback_url="http://your.domain.receive")
r = store.upload("/your/file/path/hello.jpg")

redirect after finished

from ebcloudstore.client import EbStore
# will redirect the referer url when upload finished
store = EbStore("your token",action="redirect",referer="http://your.domain.receive")
r = store.upload("/your/file/path/hello.jpg")
  • tips: also can use javascript in web browser direct upload file to cloud server

Installation

Automatic installation:

pip install ebcloudstore
  • once you want to use this sdk,first of all you need a token, apply for by email to tsengdavid@126.com
  • only python3.x supported

Release History

This version
History Node

1.2

History Node

1.1

History Node

1.0

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
ebcloudstore-1.2.tar.gz
(3.9 kB) Copy SHA256 Hash SHA256
Source None Feb 13, 2018

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting