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


Release history Release notifications

This version

0.1.0

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 hashes
Filename, size tencentcloud-apigateway-authorization-0.1.0.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page