Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.01 KB

README.rst

File metadata and controls

37 lines (25 loc) · 1.01 KB

The Qcloud API SDK for Python

Qcloud Python SDK is the official software development kit, which allows Python developers to write software that makes use of qcloud services like CVM and CBS.

The SDK works on Python versions:

  • 2.7 and greater, including 3.x.x

Quick Start

First, install the library:

$ pip install qcloudapi-sdk-python

or download source code from github and install:

$ git clone https://github.com/QcloudApi/qcloudapi-sdk-python.git
$ cd qcloudapi-sdk-python
$ python setup.py install

Then, from a Python interpreter or script:

>>> from QcloudApi.qcloudapi import QcloudApi
>>> module = 'cvm'
>>> action = 'DescribeInstances'
>>> config = {'Region':'ap-guangzhou', 'secretId':'xxxx', 'secretKey':'xxxx', 'Version':'2017-03-20'}
>>> params = {'Limit':1}
>>> service = QcloudApi(module, config)
>>> service.call(action, params)