与Vuforia Web Services (VWS) API交互的认证和授权工具。
项目描述
VWS Auth Tools
与Vuforia Web Services (VWS) API交互的认证和授权工具。
安装
pip install vws-auth-tools
此版本已在Python 3.12+上进行了测试。
用法
from urllib.parse import urljoin
import requests
from vws_auth_tools import authorization_header, rfc_1123_date
request_path = '/targets'
content = b''
method = 'GET'
date = rfc_1123_date()
authorization_header = authorization_header(
access_key='my_access_key',
secret_key='my_secret_key',
method=method,
content=content,
content_type='',
date=date,
request_path=request_path,
)
headers = {'Authorization': authorization_header, 'Date': date}
response = requests.request(
method=method,
url=urljoin(base='https://vws.vuforia.com', url=request_path),
headers=headers,
data=content,
)
assert response.status_code == 200, response.text
完整文档
查看完整文档。
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。
源代码发行版
vws_auth_tools-2024.7.12.tar.gz (19.1 kB 查看哈希)
构建分发
关闭
哈希值 for vws_auth_tools-2024.7.12-py2.py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 673bb0be98e2112a008f3146ab24a0276dc26de8c43cb40546d9a54821cb9e48 |
|
MD5 | 4be9dab4c9e9f3811651e582bbf5efa4 |
|
BLAKE2b-256 | ff34d6c791bffdc3cb2e920468d255d0fa23366cb8415c1ba3db26127cc1c789 |