python编程语言的官方qingstor sdk。
qingstor-sdk的Python项目详细描述
用于python的qingstor sdk
python编程语言的官方qingstor sdk。
开始
安装
请参阅Installation Guide,并安装此sdk。
**从v2.3.0开始,qingstor sdk python只支持python 3**
准备
在开始之前,请python到QingCloud Console创建一对青云api accesskey。
api访问密钥示例:
access_key_id:'ACCESS_KEY_ID_EXAMPLE'secret_access_key:'SECRET_ACCESS_KEY_EXAMPLE'
使用量
现在你可以开始编码了。您可以阅读下面列表中的详细指南以获得清晰的理解,或者仅以快速入门代码为例。
查看我们的releases和change log以获取有关最新功能、错误修复和新思想的信息。
快速启动代码示例:
fromqingstor.sdk.service.qingstorimportQingStorfromqingstor.sdk.configimportConfigconfig=Config('ACCESS_KEY_ID_EXAMPLE','SECRET_ACCESS_KEY_EXAMPLE')qingstor=QingStor(config)# List all buckets.output=qingstor.list_buckets()# Print HTTP status code.print(output.status_code)# Print the count of buckets.print(output['count'])# Print the first bucket name.print(output['buckets'][0]['name'])# Print Content-Type header.print(output.headers['Content-Type'])# Print whole content.print(output.content)
参考文件
贡献
请在提交修补程序之前查看此项目的Contributing Guidelines。
许可证
apache许可证(2.0版,2004年1月)。