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.

Files for tencentcloud-apigateway-authorization, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size tencentcloud_apigateway_authorization-0.1.0-py2.py3-none-any.whl (2.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size tencentcloud-apigateway-authorization-0.1.0.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page