Skip to content

Repository files navigation

Build StatusPyPI

VWS Auth Tools

Authentication and authorization tools for interacting with the Vuforia Web Services (VWS) API.

Installation

pip install vws-auth-tools

This is tested on Python 3.13+.

Usage

"""Make a request to the VWS API."""importosfromhttpimportHTTPStatusfromurllib.parseimporturljoinimportrequestsfromvws_auth_toolsimportauthorization_header, rfc_1123_dateaccess_key=os.environ["VWS_SERVER_ACCESS_KEY"]
secret_key=os.environ["VWS_SERVER_SECRET_KEY"]
request_path="/targets"content=b""method="GET"formatted_date=rfc_1123_date()
authorization_header_value=authorization_header(
access_key=access_key,
secret_key=secret_key,
method=method,
content=content,
content_type="",
date=formatted_date,
request_path=request_path,
)
headers= {
"Authorization": authorization_header_value,
"Date": formatted_date,
}
response=requests.request(
method=method,
url=urljoin(base="https://vws.vuforia.com", url=request_path),
headers=headers,
data=content,
timeout=30,
)
assertresponse.status_code==HTTPStatus.OK, response.text

Full Documentation

See the full documentation.

About

Helpers for making applications which authenticate with Vuforia Web Services

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages