Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Aliyun API Python

一个简单的阿里云API Python封装库

使用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:阿里云AccessKey ID

access_key_secret:阿里云AccessKey Secret

http_method:http请求方式,例如POST

host:服务地址,详见服务区域列表

uri:资源路径

x_acs_action:API名称

x_acs_version:API版本

algorithm:签名算法,默认为ACS3-HMAC-SHA256,一般情况下无需更改

更多参数信息详见请求结构和签名机制

使用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实例

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.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aliyun_api_py-1.1.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file aliyun_api_py-1.1.3.tar.gz.

File metadata

  • Download URL: aliyun_api_py-1.1.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for aliyun_api_py-1.1.3.tar.gz
Algorithm Hash digest
SHA256 df9d4e628f87233aa9a30d671748a142fb243fad1149d953f4351e9b5cf0522e
MD5 4078daebaacd00e12419dbb0eb7d40b7
BLAKE2b-256 6016030c2ea21c660c13662560cc03a207b5f577072162698da3cd8c49caa546

See more details on using hashes here.

File details

Details for the file aliyun_api_py-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: aliyun_api_py-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for aliyun_api_py-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3ed0a06237eb4c1f54b485b142a8a209e916ebe680a4a7714840c3c6b3e4096c
MD5 2291f2368e27ef8a1b2c65f4a3e8a987
BLAKE2b-256 70c8b21b57307a3acd57e73e14fcc9d6ce36c275d54835822cd8d54cfa951734

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page