Skip to main content

api project for v2&v3

Project description

TXAPI

轻量级的腾讯云SDK, 同时支持 yunapi2 与 yunapi3, 支持 公有云 / 专有云(租户端&运营端).

Install

pip install txapi

Project: https://pypi.org/project/txapi/1.0.0/

DEMO

配置文件 config.py

# -*- coding:utf-8 -*-
from txapi import API

client = API.v3(
    api_domain="云API请求的域名",
    region="地域名称",
    secret_id="云API密钥id",
    secret_key="云API密钥key",
    debug=False,
    ssl=True)

cvm = client.get_client("cvm", "2017-03-12")

params = {
    "Limit": 20,
    "Offset": 1
}
print(cvm.request("DescribeInstances", params))
参数说明:

- api_domain: 云API请求的域名:
    默认为公有云域名, 也支持专有云(租户端+运营端)
    公有云: tencentcloudapi.com
    租户端api2: api2.环境主域名
    租户端api3: api3.环境主域名
    运营端api2: yunapi2.环境主域名
    运营端api3: yunapi3.环境主域名
- region: 地域名称
- secret_id, secret_key: 云API密钥
- ssl (是否开启https, 默认为True)
- debug(是否打印请求响应信息, 默认为False),
- 公有云密钥登录腾讯云控制台获取: https://console.cloud.tencent.com/cam/capi

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

txapi-1.0.1.tar.gz (2.4 MB view details)

Uploaded Source

File details

Details for the file txapi-1.0.1.tar.gz.

File metadata

  • Download URL: txapi-1.0.1.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.26.0 setuptools/44.1.1 requests-toolbelt/0.10.1 tqdm/4.64.0 CPython/2.7.18

File hashes

Hashes for txapi-1.0.1.tar.gz
Algorithm Hash digest
SHA256 590433eea9a7524ac480ed222059bdb6ca2758e79fc54ef06c6d17d29f5ad9c4
MD5 adb504e794c92547f2a242ffb7bfdb65
BLAKE2b-256 5b7714c41c6e83910c52a3c26eb4e697cbb66edd97f364eca7aa884cfb336841

See more details on using hashes here.

Supported by

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