upyun / python-sdk

UPYUN Python SDK
117 stars 29 forks source link

Add cd and getLargeList function #23

Closed monhz closed 8 years ago

monhz commented 8 years ago

cd func:

up.cd('upyun-python-sdk')
up.put('ascii.txt', 'abcdefghijklmnopqrstuvwxyz\n')

The file will be uploaded in the path: /upyun-python-sdk/ascii.txt. The API which support changing working direction: usage, put, get, getlist, getinfo, mkdir, delete, purge.

getLargeList func:

up.getlist('/largelist', limit=10000)
yejingx commented 8 years ago

这种做法在 list 数量比较少的时候是可行的,但是如果 list 目录下有几十万条记录,就显得不是很高效。建议在 list 大目录的时候,加入一个新的接口(比如 iterlist)返回迭代器。

yejingx commented 8 years ago

ci failed.

upyun/upyun.py:42:13: E128 continuation line under-indented for visual indent
monhz commented 8 years ago

bug fixed. 但 ci 的配置参数好像有问题, 望修改一下