Name | vws-python-mock JSON |
Version |
2025.2.18
JSON |
| download |
home_page | None |
Summary | A mock for the Vuforia Web Services (VWS) API. |
upload_time | 2025-02-18 01:04:21 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.13 |
license | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
|
keywords |
client
fake
mock
vuforia
vws
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
|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.
.. 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 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.
.. _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/actions/workflows/ci.yml/badge.svg?branch=main
: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
.. |minimum-python-version| replace:: 3.13
Raw data
{
"_id": null,
"home_page": null,
"name": "vws-python-mock",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": "client, fake, mock, vuforia, vws",
"author": null,
"author_email": "Adam Dangoor <adamdangoor@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ee/47/0e1abbe0e8b3cd006c58023f3df2470647b71779dec4a4e47026cb03e5fe/vws_python_mock-2025.2.18.tar.gz",
"platform": null,
"description": "|Build Status| |codecov| |PyPI| |Documentation Status|\n\nVWS Mock\n========\n\n.. contents::\n :local:\n\nMock for the Vuforia Web Services (VWS) API and the Vuforia Web Query API.\n\nMocking calls made to Vuforia with Python ``requests``\n------------------------------------------------------\n\nUsing the mock redirects requests to Vuforia made with `requests`_ to an in-memory implementation.\n\n.. code-block:: shell\n\n pip install vws-python-mock\n\nThis requires Python |minimum-python-version|\\+.\n\n.. code-block:: python\n\n \"\"\"Make a request to the Vuforia Web Services API mock.\"\"\"\n\n import requests\n\n from mock_vws import MockVWS\n from mock_vws.database import VuforiaDatabase\n\n with MockVWS() as mock:\n database = VuforiaDatabase()\n mock.add_database(database=database)\n # This will use the Vuforia mock.\n requests.get(url=\"https://vws.vuforia.com/summary\", timeout=30)\n\nBy default, an exception will be raised if any requests to unmocked addresses are made.\n\n.. _requests: https://pypi.org/project/requests/\n\nUsing Docker to mock calls to Vuforia from any language\n-------------------------------------------------------\n\nIt is possible run a Mock VWS instance using Docker containers.\n\nThis allows you to run tests against a mock VWS instance regardless of the language or tooling you are using.\n\nSee the `the instructions <https://vws-python-mock.readthedocs.io/en/latest/docker.html>`__ for how to do this.\n\nFull documentation\n------------------\n\nSee the `full documentation <https://vws-python-mock.readthedocs.io/en/latest>`__.\nThis includes details on how to use the mock, options, and details of the differences between the mock and the real Vuforia Web Services.\n\n\n.. |Build Status| image:: https://github.com/VWS-Python/vws-python-mock/actions/workflows/ci.yml/badge.svg?branch=main\n :target: https://github.com/VWS-Python/vws-python-mock/actions\n.. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python-mock/branch/main/graph/badge.svg\n :target: https://codecov.io/gh/VWS-Python/vws-python-mock\n.. |PyPI| image:: https://badge.fury.io/py/VWS-Python-Mock.svg\n :target: https://badge.fury.io/py/VWS-Python-Mock\n.. |Documentation Status| image:: https://readthedocs.org/projects/vws-python-mock/badge/?version=latest\n :target: https://vws-python-mock.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. |minimum-python-version| replace:: 3.13\n",
"bugtrack_url": null,
"license": "The MIT License\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ",
"summary": "A mock for the Vuforia Web Services (VWS) API.",
"version": "2025.2.18",
"project_urls": {
"Documentation": "https://vws-python-mock.readthedocs.io",
"Source": "https://github.com/VWS-Python/vws-python-mock"
},
"split_keywords": [
"client",
" fake",
" mock",
" vuforia",
" vws"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "cdd7e1f3c45f499a81ba9ca4b9fc1d05a9d5eaeee0b73f370a254a39c089c99c",
"md5": "7f4a1e2d85e8be558f4219fb8819af54",
"sha256": "9e7dfde714151560cce6d7328865e0315230f779756f3cf2288248a0cca5569e"
},
"downloads": -1,
"filename": "vws_python_mock-2025.2.18-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f4a1e2d85e8be558f4219fb8819af54",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.13",
"size": 66390,
"upload_time": "2025-02-18T01:04:19",
"upload_time_iso_8601": "2025-02-18T01:04:19.319445Z",
"url": "https://files.pythonhosted.org/packages/cd/d7/e1f3c45f499a81ba9ca4b9fc1d05a9d5eaeee0b73f370a254a39c089c99c/vws_python_mock-2025.2.18-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ee470e1abbe0e8b3cd006c58023f3df2470647b71779dec4a4e47026cb03e5fe",
"md5": "844bec39275b33c9046383a522306f85",
"sha256": "152c13d1ae4be76c98d48194ad5796ec5d0c8ae8a182721e93d1d08509f1eee2"
},
"downloads": -1,
"filename": "vws_python_mock-2025.2.18.tar.gz",
"has_sig": false,
"md5_digest": "844bec39275b33c9046383a522306f85",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 133230,
"upload_time": "2025-02-18T01:04:21",
"upload_time_iso_8601": "2025-02-18T01:04:21.782118Z",
"url": "https://files.pythonhosted.org/packages/ee/47/0e1abbe0e8b3cd006c58023f3df2470647b71779dec4a4e47026cb03e5fe/vws_python_mock-2025.2.18.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-18 01:04:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "VWS-Python",
"github_project": "vws-python-mock",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "vws-python-mock"
}