Skip to main content

nullpa 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) >= 1:
            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"]
            fn_arr = f.name.split(".")
            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
store = EbStore("your token",action="callback",callback_url="http://your.domain.receive")
r = store.upload("/your/file/path/hello.jpg")

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 zhengdw@56iq.com
  • only python3.x supported

Project details


Download files

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

Files for ebcloudstore, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size ebcloudstore-1.0.win-amd64.exe (226.0 kB) File type Windows Installer Python version any Upload date Hashes View
Filename, size ebcloudstore-1.0.zip (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page