Metadata-Version: 2.4
Name: vws-python-mock
Version: 2026.2.22
Summary: A mock for the Vuforia Web Services (VWS) API.
Author-email: Adam Dangoor <adamdangoor@gmail.com>
License-Expression: MIT
Project-URL: Documentation, https://vws-python.github.io/vws-python-mock/
Project-URL: Source, https://github.com/VWS-Python/vws-python-mock
Keywords: client,fake,mock,vuforia,vws
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Pytest
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.13
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: beartype>=0.22.9
Requires-Dist: flask>=3.0.3
Requires-Dist: httpx>=0.27.0
Requires-Dist: numpy>=1.26.4
Requires-Dist: pillow>=11.0.0
Requires-Dist: piq>=0.8.0
Requires-Dist: pydantic-settings>=2.6.1
Requires-Dist: requests>=2.32.3
Requires-Dist: responses>=0.25.3
Requires-Dist: respx>=0.21.0
Requires-Dist: torch>=2.5.1
Requires-Dist: torchmetrics>=1.5.1
Requires-Dist: torchvision>=0.20.1
Requires-Dist: tzdata; sys_platform == "win32"
Requires-Dist: vws-auth-tools>=2024.7.12
Requires-Dist: werkzeug>=3.1.2
Provides-Extra: dev
Requires-Dist: actionlint-py==1.7.11.24; extra == "dev"
Requires-Dist: check-manifest==0.51; extra == "dev"
Requires-Dist: check-wheel-contents==0.6.3; extra == "dev"
Requires-Dist: coverage==7.13.4; extra == "dev"
Requires-Dist: deptry==0.24.0; extra == "dev"
Requires-Dist: dirty-equals==0.11; extra == "dev"
Requires-Dist: doc8==2.0.0; extra == "dev"
Requires-Dist: doccmd==2026.2.15; extra == "dev"
Requires-Dist: docker==7.1.0; extra == "dev"
Requires-Dist: enum-tools[sphinx]==0.13.0; extra == "dev"
Requires-Dist: freezegun==1.5.5; extra == "dev"
Requires-Dist: furo==2025.12.19; extra == "dev"
Requires-Dist: interrogate==1.7.0; extra == "dev"
Requires-Dist: mypy[faster-cache]==1.19.1; extra == "dev"
Requires-Dist: mypy-strict-kwargs==2026.1.12; extra == "dev"
Requires-Dist: prek==0.3.3; extra == "dev"
Requires-Dist: pydocstringformatter==0.7.5; extra == "dev"
Requires-Dist: pydocstyle==6.3; extra == "dev"
Requires-Dist: pylint[spelling]==4.0.4; extra == "dev"
Requires-Dist: pylint-per-file-ignores==3.2.0; extra == "dev"
Requires-Dist: pyproject-fmt==2.16.1; extra == "dev"
Requires-Dist: pyrefly==0.53.0; extra == "dev"
Requires-Dist: pyright==1.1.408; extra == "dev"
Requires-Dist: pyroma==5.0.1; extra == "dev"
Requires-Dist: pytest==9.0.2; extra == "dev"
Requires-Dist: pytest-retry==1.7.0; extra == "dev"
Requires-Dist: pytest-xdist==3.8.0; extra == "dev"
Requires-Dist: python-dotenv==1.2.1; extra == "dev"
Requires-Dist: pyyaml==6.0.3; extra == "dev"
Requires-Dist: requests-mock-flask==2026.2.16; extra == "dev"
Requires-Dist: ruff==0.15.1; extra == "dev"
Requires-Dist: shellcheck-py==0.11.0.1; extra == "dev"
Requires-Dist: shfmt-py==3.12.0.2; extra == "dev"
Requires-Dist: sphinx==8.2.3; extra == "dev"
Requires-Dist: sphinx-copybutton==0.5.2; extra == "dev"
Requires-Dist: sphinx-lint==1.0.2; extra == "dev"
Requires-Dist: sphinx-paramlinks==0.6; extra == "dev"
Requires-Dist: sphinx-pyproject==0.3.0; extra == "dev"
Requires-Dist: sphinx-substitution-extensions==2026.1.12; extra == "dev"
Requires-Dist: sphinx-toolbox==4.1.2; extra == "dev"
Requires-Dist: sphinxcontrib-httpdomain==2.0.0; extra == "dev"
Requires-Dist: sphinxcontrib-spelling==8.0.2; extra == "dev"
Requires-Dist: sybil==9.3.0; extra == "dev"
Requires-Dist: tenacity==9.1.4; extra == "dev"
Requires-Dist: ty==0.0.17; extra == "dev"
Requires-Dist: types-docker==7.1.0.20260109; extra == "dev"
Requires-Dist: types-pyyaml==6.0.12.20250915; extra == "dev"
Requires-Dist: types-requests==2.32.4.20260107; extra == "dev"
Requires-Dist: urllib3==2.6.3; extra == "dev"
Requires-Dist: vulture==2.14; extra == "dev"
Requires-Dist: vws-python==2026.2.21; extra == "dev"
Requires-Dist: vws-test-fixtures==2023.3.5; extra == "dev"
Requires-Dist: vws-web-tools==2026.2.20; extra == "dev"
Requires-Dist: yamlfix==1.19.1; extra == "dev"
Requires-Dist: zizmor==1.22.0; extra == "dev"
Provides-Extra: release
Requires-Dist: check-wheel-contents==0.6.3; extra == "release"
Dynamic: license-file

|Build Status| |PyPI|

VWS Mock
========

.. contents::
   :local:

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

Mocking calls made to Vuforia with Python ``requests``
------------------------------------------------------

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

.. code-block:: shell

    pip install vws-python-mock

This requires Python |minimum-python-version|\+.

.. code-block:: python

    """Make a request to the Vuforia Web Services API mock."""

    import requests

    from mock_vws import MockVWS
    from mock_vws.database import CloudDatabase

    with MockVWS() as mock:
        database = CloudDatabase()
        mock.add_cloud_database(cloud_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.

.. _requests: https://pypi.org/project/requests/

Mocking calls made to Vuforia with Python ``httpx``
----------------------------------------------------

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

.. code-block:: python

    """Make a request to the Vuforia Web Services API mock."""

    import httpx

    from mock_vws import MockVWSForHttpx
    from mock_vws.database import CloudDatabase

    with MockVWSForHttpx() as mock:
        database = CloudDatabase()
        mock.add_cloud_database(cloud_database=database)
        # This will use the Vuforia mock.
        httpx.get(url="https://vws.vuforia.com/summary", timeout=30)

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

.. _httpx: https://pypi.org/project/httpx/

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 the `the instructions <https://vws-python.github.io/vws-python-mock/docker.html>`__ for how to do this.

Full documentation
------------------

See the `full documentation <https://vws-python.github.io/vws-python-mock/>`__.
This includes details on how to use the mock, options, and details of the differences between the mock and the real Vuforia Web Services.


.. |Build Status| image:: https://github.com/VWS-Python/vws-python-mock/actions/workflows/test.yml/badge.svg?branch=main
   :target: https://github.com/VWS-Python/vws-python-mock/actions
.. |PyPI| image:: https://badge.fury.io/py/VWS-Python-Mock.svg
    :target: https://badge.fury.io/py/VWS-Python-Mock
.. |minimum-python-version| replace:: 3.13
