vws-python-mock¶
Mocking calls made to Vuforia with Python requests¶
$ pip install vws-python-mock
This requires Python 3.13+.
Using the mock redirects requests to Vuforia made with requests to an in-memory implementation.
"""Make a request to the Vuforia Web Services API mock."""
import requests
from mock_vws import MockVWS
from mock_vws.database import VuforiaDatabase
with MockVWS() as mock:
database = VuforiaDatabase()
mock.add_database(database=database)
# This will use the Vuforia mock.
requests.get(url="https://vws.vuforia.com/summary", timeout=30)
By default, an exception will be raised if any requests to unmocked addresses are made.
See API Reference for details of what can be changed and how.
Using Docker to mock calls to Vuforia from any language¶
It is possible run a Mock VWS instance using Docker containers.
This allows you to run tests against a mock VWS instance regardless of the language or tooling you are using.
See Running a server with Docker for how to do this.
Reference¶
- Installation
- Getting started
- Running a server with Docker
- API Reference
MockVWSMissingSchemeErrorVuforiaDatabaseVuforiaDatabase.database_nameVuforiaDatabase.server_access_keyVuforiaDatabase.server_secret_keyVuforiaDatabase.client_access_keyVuforiaDatabase.client_secret_keyVuforiaDatabase.targetsVuforiaDatabase.stateVuforiaDatabase.request_quotaVuforiaDatabase.reco_thresholdVuforiaDatabase.current_month_recosVuforiaDatabase.previous_month_recosVuforiaDatabase.total_recosVuforiaDatabase.target_quota
StatesTarget- Image matchers
- Target raters
- Differences between the mock and the real Vuforia Web Services
- Image matching
- Speed and summary accuracy
- Image quality and ratings
- Matching recently deleted targets
- Accepted date formats for the Query API
- Targets stuck in processing
- Database summary quotas
transfer-encodingheadersContent-Encodingheaders- NGINX Error cases
- Result codes
Content-Lengthheaders- Header cases
- Versioning, Support and API Stability
- Contributing to vws-python-mock