konstin / vws-python-mock

Mock of the Vuforia Web Services (VWS) API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status codecov PyPI Documentation Status

VWS Mock

Mock for the Vuforia Web Services (VWS) API and the Vuforia Web Query API.

Using the mock redirects requests to Vuforia made with requests to an in-memory implementation.

This requires Python 3.12+.

pip install vws-python-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('https://vws.vuforia.com/summary')

By default, an exception will be raised if any requests to unmocked addresses are made.

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 the the instructions for how to do this.

See the full documentation. This includes details on how to use the mock, options, and details of the differences between the mock and the real Vuforia Web Services.

About

Mock of the Vuforia Web Services (VWS) API

License:MIT License


Languages

Language:Python 97.4%Language:HTML 1.9%Language:Makefile 0.4%Language:Dockerfile 0.2%Language:Shell 0.1%