开发者社区> 问答> 正文

非官方OSSPythonSDK

github.com/michaelliao/aliosspy/blob/master/alioss.py


非官方OSS Python SDK


特点:


API简单
单个py文件(<200行)
无第三方依赖
支持Python 2.6 / 2.7

示例代码:
client = Client('access-key-id', 'access-key-secret', 'bucket_name')
    print client.put_object('the/path/hello.html', 'this is just a test and should return url')
    # http://storage.aliyun.com/bucket-name/the/path/hello.html

    print client.get_object('the/path/hello.html')
    # file content as str...

    client.delete_object('the/path/hello.html')

    print client.get_object('the/path/hello.html')
    # Traceback (most recent call last):
    #   ...
    # StorageError: ('NoSuchKey', 'The specified key does not exist.')

展开
收起
asklxf 2012-10-12 16:23:37 8631 0
1 条回答
写回答
取消 提交回答
  • Re非官方OSSPythonSDK
    不会用,求具体方法
    2013-03-07 19:49:55
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《Java开发手册》2019最新版发布! 立即下载
阿里巴巴Java开发手册PDF1.2.0版(非最新版) 立即下载
阿里巴巴Java开发手册PDF1.1.0版(非最新版) 立即下载