AnchnetCloud Python SDK
This repository allows you to access AnchCloud and control your resources from your applications.
This SDK is licensed under Apache Licence, Version 2.0.
Installation
Install via pip
$ pip install anchcloud-sdk
Upgrade to the latest version
$ pip install --upgrade anchcloud-sdk
Getting Started
In order to operate AnchCloud IaaS. you need apply access key on anchcloud console first.
AnchCloud IaaS API
Pass access key id and secret key into class APIConnection to create connection
>>> from anchcloud.iaas.instances import *
>>> conn = APIConnection('CLIENTID','SECRETKEY')
The variable APIConnection is the instance of anchcloud.conn.iaas_client, we can use it to call resource related methods.
Example:
# launch instances
>>> d = {
"instance": {
"zone": "ac2",
"image_id": "centos64x64c",
"instance_type": "PERFORMANCE",
"cpu": 1,
"memory": 1024,
"count": 1,
"login_mode": "passwd",
"login_passwd": "Abcd1234"
},
"order": {
"payment_type": "POSTPAY"
}
}
>>> ret = Instances(conn).create("ac2",d)
# stop instances
>>> d = {
"instances": [
"ins-Y4DFAOQ"
]
}
>>> ret = Instances(conn).stop("ac2",d)
# describe instances
>>> d = {"status": "running,stopped"]}
>>> ret = Instances(conn).list("ac2",d)
Release files for anchcloud-sdk 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anchcloud-sdk-0.0.1.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anchcloud_sdk-0.0.1-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 24.0 kB
Release files / anchcloud-sdk-0.0.1.tar.gz
| Download URL | anchcloud-sdk-0.0.1.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71fcdfe38c8cadf5596933ba4016de5d092a048733b851bc29de4c69d5307163
|
|
BLAKE2b-256 checksum How to use checksums |
e43ac475edab6d45ff91dea53e57667e16f55c3e2f73f174ce1152da0caade0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / anchcloud_sdk-0.0.1-py2-none-any.whl
| Download URL | anchcloud_sdk-0.0.1-py2-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
5cec2a0a480897d74551637ab5cfac6454c0c644e3d85353b0427f9556af3aca
|
|
BLAKE2b-256 checksum How to use checksums |
9bb4fcedd10e758b86ca4bc5b99cbc898c8e4350846d321d2f114778aca38616
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |