Name | vws-python-mock JSON |
Version |
2024.7.15
JSON |
| download |
home_page | None |
Summary | A mock for the Vuforia Web Services (VWS) API. |
upload_time | 2024-07-15 18:54:21 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
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.
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
Raw data
{
"_id": null,
"home_page": null,
"name": "vws-python-mock",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"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/8b/b4/42c3c5074490802c15ab7ac4702abaa133dd88c75d55a93500fe080277d9/vws_python_mock-2024.7.15.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\nThis requires Python 3.12+.\n\n.. code:: sh\n\n pip install vws-python-mock\n\n.. code-block:: python\n\n import requests\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('https://vws.vuforia.com/summary')\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/workflows/CI/badge.svg\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",
"bugtrack_url": null,
"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. ",
"summary": "A mock for the Vuforia Web Services (VWS) API.",
"version": "2024.7.15",
"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": "",
"digests": {
"blake2b_256": "fafd7518b3092b97f208195b0379bae15df8c33c885d20eb8f0475a543cc3307",
"md5": "fac76b0d77becc11d815431f956490ff",
"sha256": "c65cf21f49ed12ab8c42afe92a529c6678417c2bdd397976f509756e0c696892"
},
"downloads": -1,
"filename": "vws_python_mock-2024.7.15-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "fac76b0d77becc11d815431f956490ff",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.12",
"size": 64664,
"upload_time": "2024-07-15T18:54:19",
"upload_time_iso_8601": "2024-07-15T18:54:19.536440Z",
"url": "https://files.pythonhosted.org/packages/fa/fd/7518b3092b97f208195b0379bae15df8c33c885d20eb8f0475a543cc3307/vws_python_mock-2024.7.15-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8bb442c3c5074490802c15ab7ac4702abaa133dd88c75d55a93500fe080277d9",
"md5": "707139916f25df07392ffab391f3d80b",
"sha256": "881432f382dfeb1f2a517760ee7b37aa2395ad0624d994e5f506eda7d9501abd"
},
"downloads": -1,
"filename": "vws_python_mock-2024.7.15.tar.gz",
"has_sig": false,
"md5_digest": "707139916f25df07392ffab391f3d80b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 127353,
"upload_time": "2024-07-15T18:54:21",
"upload_time_iso_8601": "2024-07-15T18:54:21.031239Z",
"url": "https://files.pythonhosted.org/packages/8b/b4/42c3c5074490802c15ab7ac4702abaa133dd88c75d55a93500fe080277d9/vws_python_mock-2024.7.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-15 18:54: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"
}