Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vws-python-mock

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vws-python-mock

A mock for the Vuforia Web Services (VWS) API.

  • 2024.8.30
  • Source
  • PyPI
  • Socket score

Maintainers
1

|Build Status| |codecov| |PyPI| |Documentation Status|

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.

This requires Python 3.12+.

.. code:: sh

pip install vws-python-mock

.. code-block:: python

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.

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

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-mock.readthedocs.io/en/latest/docker.html>__ for how to do this.

Full documentation

See the full documentation <https://vws-python-mock.readthedocs.io/en/latest>__. 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/workflows/CI/badge.svg :target: https://github.com/VWS-Python/vws-python-mock/actions .. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python-mock/branch/main/graph/badge.svg :target: https://codecov.io/gh/VWS-Python/vws-python-mock .. |PyPI| image:: https://badge.fury.io/py/VWS-Python-Mock.svg :target: https://badge.fury.io/py/VWS-Python-Mock .. |Documentation Status| image:: https://readthedocs.org/projects/vws-python-mock/badge/?version=latest :target: https://vws-python-mock.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc