Skip to main content

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

Release files for tencentcloud-apigateway-authorization 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tencentcloud-apigateway-authorization 0.1.0
File Size Uploaded
tencentcloud-apigateway-authorization-0.1.0.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tencentcloud-apigateway-authorization 0.1.0
File Interpreter ABI Platform
tencentcloud_apigateway_authorization-0.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 5.9 kB

Release files / tencentcloud-apigateway-authorization-0.1.0.tar.gz

Download URL tencentcloud-apigateway-authorization-0.1.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2e2556657eb4f2619f5beba0e11bc5c36681f6f47208f6b82e4af773f8c462fe
BLAKE2b-256 checksum
How to use checksums
57d0238b1a539619983c7c8a2dca35e6e7ed8a2730cfcc6074e2ce6b50388c72
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / tencentcloud_apigateway_authorization-0.1.0-py2.py3-none-any.whl

Download URL tencentcloud_apigateway_authorization-0.1.0-py2.py3-none-any.whl
Size 2.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6f039b3b0167f0b0d6354f45fac7b75864dfb335316aaea4eac33483f2e2b78e
BLAKE2b-256 checksum
How to use checksums
c6f222a02c08eca21211a46367ed2acd065cc67cf9dc2e261bc70b3f2b48e669
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page