Skip to main content

Generate headers with authorization for the request of TencentCloud Apigateway API.

Project description

tencentcloud-apigateway-authorization

Generate headers with authorization for the request of TencentCloud Apigateway API. 为腾讯云Api网管服务的AP的请求I生成带有authorization认证信息的header

Install

pip install tencentcloud-apigateway-authorization

Use

import os

from apigateway import Auth
import requests

secretId = os.environ['secretId']
secretKey = os.environ['secretKey']
auth = Auth(secretId, secretKey)
headers = auth.generateHeaders()
response = requests.get('https://service-{appid}.ap-shanghai.apigateway.myqcloud.com/release/api', headers=headers)
print(response.json())

Author

Yixian Du

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

Built Distribution

File details

Details for the file tencentcloud-apigateway-authorization-0.1.0.tar.gz.

File metadata

  • Download URL: tencentcloud-apigateway-authorization-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3

File hashes

Hashes for tencentcloud-apigateway-authorization-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2e2556657eb4f2619f5beba0e11bc5c36681f6f47208f6b82e4af773f8c462fe
MD5 6015ce80c7811a1b2c901feebaaf8ebe
BLAKE2b-256 57d0238b1a539619983c7c8a2dca35e6e7ed8a2730cfcc6074e2ce6b50388c72

See more details on using hashes here.

File details

Details for the file tencentcloud_apigateway_authorization-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for tencentcloud_apigateway_authorization-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6f039b3b0167f0b0d6354f45fac7b75864dfb335316aaea4eac33483f2e2b78e
MD5 5a1350b42ca19c94e257b8f45b6ee110
BLAKE2b-256 c6f222a02c08eca21211a46367ed2acd065cc67cf9dc2e261bc70b3f2b48e669

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