A simple library for Aliyun API
Project description
Aliyun API Python
一个简单的阿里云API Python封装库与SDK
使用API封装库
import aliyun_api_py
# 创建API请求
request = aliyun_api_py.Api(access_key_id, access_key_secret, http_method, host, uri, x_acs_action, x_acs_version,algorithm)
request.param["your-param"] = "sth"
request.body["your-body"] = "sth"
print(request.exec())
access_key_id
:
access_key_secret
:
http_method
:
host
:
uri
:
x_acs_action
:
x_acs_version
:
algorithm
:
更多参数信息详见请求结构和签名机制
使用SDK
目前SDK随缘更新,碰到自己需要的API可能会随手写个SDK方便调用
API相关信息详见阿里云API文档
import aliyun_api_py
# 调用请求函数(以重启ECS为例)
request = aliyun_api_py.Ecs(access_key_id, access_key_secret, host)
print(request.reboot_instance(instance_id, force_stop, dry_run))
ECS
ecs.reboot_instance(instance_id, force_stop, dry_run)
:重启ECS实例
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aliyun_api_py-1.1.0.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for aliyun_api_py-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf8eec20786536767b88eb68198c216d9b24037b96fc70554e87b2bd768ee849 |
|
MD5 | cc2403c82806150a8e35394f7029f765 |
|
BLAKE2b-256 | 60683a3812c787af9018681fd873bd4dae88cc59e634612e6b571e058b4927db |