Python API

This reference is generated from the source code.

Tools for interacting with the VWS (Vuforia Web Services) website.

class vws_web_tools.DatabaseDict

Bases: TypedDict

A dictionary type which represents a database.

client_access_key
client_secret_key
database_name
server_access_key
server_secret_key
class vws_web_tools.LicenseDict

Bases: TypedDict

A dictionary type which represents a license.

license_key
license_name
class vws_web_tools.ModelTargetWebAPIDict

Bases: TypedDict

A dictionary type which represents Model Target Web API details.

cad_data_url
client_id
client_secret
class vws_web_tools.VuMarkDatabaseDict

Bases: TypedDict

A dictionary type which represents a VuMark database.

VuMark databases only have server access keys.

database_name
server_access_key
server_secret_key
class vws_web_tools._ModelTargetWebAPIClientCredentials(*, client_id, client_secret)

Bases: object

Model Target Web API client credentials.

client_id
client_secret
vws_web_tools._create_model_target_web_api_client_credentials(*, driver, credential_name, scopes)

Create OAuth2 client credentials for the Model Target Web API.

Dismiss the OneTrust cookie consent banner if present.

Find and return a target-name link.

vws_web_tools._is_json_array(value, /)

Return whether value is a JSON array.

vws_web_tools._is_json_object(value, /)

Return whether value is a JSON object.

vws_web_tools._json_request(*, session, method, url, data=None, access_token=None)

Make a JSON request and return the response body.

vws_web_tools._log_in_once(*, driver, email_address, password)

Submit the login form once.

vws_web_tools._open_add_database_dialog(*, driver, database_name)

Navigate to databases page, open the add-database dialog, and enter the name.

Returns a WebDriverWait for further use.

vws_web_tools._requests_session_from_driver(*, driver)

Create a requests session using the browser’s authenticated cookies.

vws_web_tools._string_from_json(*, value, keys)

Find a non-empty string in a JSON-like value.

vws_web_tools._submit_add_database_dialog(*, wait)

Click the generate button and wait for the dialog to close.

vws_web_tools._xpath_literal(*, value)

Return an XPath string literal.

vws_web_tools.create_chrome_driver()

Create a headless Chrome WebDriver.

vws_web_tools.create_cloud_database(*, driver, database_name, license_name)

Create a cloud database.

vws_web_tools.create_license(*, driver, license_name)

Create a license.

vws_web_tools.create_vumark_database(*, driver, database_name)

Create a VuMark database.

vws_web_tools.delete_license(*, driver, license_name)

Delete a license.

vws_web_tools.get_database_details(*, driver, database_name)

Get details of a database.

vws_web_tools.get_license_details(*, driver, license_name)

Get details of a license.

vws_web_tools.get_model_target_web_api_details(*, driver, scopes=('modeltargets.standardmodeltarget.all',))

Get Model Target Web API credentials and a CAD data URL.

The scopes argument selects which OAuth2 scopes are requested for the created credential. It defaults to MODEL_TARGET_WEB_API_STANDARD_SCOPES, which is the only set of scopes available on non-Enterprise developer accounts. Pass MODEL_TARGET_WEB_API_ADVANCED_SCOPES to additionally request the advanced Model Target scope; this requires a Vuforia Enterprise developer account, and credential creation raises a RuntimeError if the account is not entitled to a requested scope.

vws_web_tools.get_vumark_database_details(*, driver, database_name)

Get details of a VuMark database.

VuMark databases only have server access keys.

vws_web_tools.get_vumark_target_id(*, driver, database_name, target_name)

Get the ID for a VuMark target in a database.

Limitation:

This navigates to the requested database but does not wait for readiness. It hard-errors if the target name is not yet rendered as a clickable link. While a target is still processing, VWS often renders plain text in that column and no target ID link is available.

vws_web_tools.log_in(*, driver, email_address, password)

Log in to Vuforia web services, retrying on timeout.

vws_web_tools.navigate_to_database(*, driver, database_name)

Navigate to a database’s page in the target manager.

vws_web_tools.navigate_to_license(*, driver, license_name)

Navigate to a license’s page in the developer portal.

vws_web_tools.upload_vumark_template(*, driver, database_name, svg_file_path, template_name, width)

Upload a VuMark SVG template to a VuMark database.

vws_web_tools.wait_for_logged_in(*, driver)

Wait for the user to be logged in.

Without this, we sometimes get a redirect to a post-login page.

Wait for a VuMark target row to be rendered on the target-key tab.

This waits until the matching target row is rendered as a clickable link.