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.
Source Distribution
Built Distribution
Close
Hashes for tencentcloud-apigateway-authorization-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e2556657eb4f2619f5beba0e11bc5c36681f6f47208f6b82e4af773f8c462fe |
|
MD5 | 6015ce80c7811a1b2c901feebaaf8ebe |
|
BLAKE2b-256 | 57d0238b1a539619983c7c8a2dca35e6e7ed8a2730cfcc6074e2ce6b50388c72 |
Close
Hashes for tencentcloud_apigateway_authorization-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f039b3b0167f0b0d6354f45fac7b75864dfb335316aaea4eac33483f2e2b78e |
|
MD5 | 5a1350b42ca19c94e257b8f45b6ee110 |
|
BLAKE2b-256 | c6f222a02c08eca21211a46367ed2acd065cc67cf9dc2e261bc70b3f2b48e669 |