Generate headers with authorization for the request of TencentCloud Apigateway API.
Project description
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())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.