Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Feature complete upyun REST client

Project description

pyupyun - Feature complete upyun REST client ===

>>> import upyun
>>> client = upyun.UpYun(bucket='bucket', auth=('user', 'pass'), stype=upyun.const.SPACE_TYPE_FILE)
>>> resp = client.put('/test/test.txt', open('/tmp/test.txt'))
>>> print resp.success
True
>>> print resp.url
http://bucket.b0.upaiyun.com/test/test.txt

Compatible with [upyun REST API v1.5](http://static.b0.upaiyun.com/upyun_api_doc.pdf)

Installation

$ pip install pyupyun

Test

To run the tests, first install the dependencies

$ pip install -r requirements.txt

Then fill in all the blank settings(documented) at the beginning part of UpYunTestCase class, which is inside test/test_upyun.py

And run

$ py.test

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 pyupyun, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size pyupyun-0.1.3.tar.gz (11.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page