vws-python-mock


Namevws-python-mock JSON
Version 2024.2.16 PyPI version JSON
download
home_page
SummaryA mock for the Vuforia Web Services (VWS) API.
upload_time2024-02-16 21:17:06
maintainer
docs_urlNone
author
requires_python>=3.12
licenseThe 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": "",
    "name": "vws-python-mock",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": "",
    "keywords": "client,fake,mock,vuforia,vws",
    "author": "",
    "author_email": "Adam Dangoor <adamdangoor@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3e/38/d26650e82a3f8396da6b5dfa52e8cbef6222ed8fd538071b219a612fbd72/vws-python-mock-2024.2.16.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.2.16",
    "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": "5ee286230402e521430e00385416baf6d976385189f4c914470482e5c1bc0651",
                "md5": "45fbf259174cb74d5644777b2a582359",
                "sha256": "29ad2d617b76f065e428c201374cbdff08a7c3a42a4eb42c9611d19b84617e98"
            },
            "downloads": -1,
            "filename": "vws_python_mock-2024.2.16-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "45fbf259174cb74d5644777b2a582359",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.12",
            "size": 63299,
            "upload_time": "2024-02-16T21:17:04",
            "upload_time_iso_8601": "2024-02-16T21:17:04.376342Z",
            "url": "https://files.pythonhosted.org/packages/5e/e2/86230402e521430e00385416baf6d976385189f4c914470482e5c1bc0651/vws_python_mock-2024.2.16-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e38d26650e82a3f8396da6b5dfa52e8cbef6222ed8fd538071b219a612fbd72",
                "md5": "9ffcd2eb6724ac28d657512739fbc424",
                "sha256": "278e3a479ec047b5a374005dd08c8c191ddfa5865a1b8f85440ee6a7b942a016"
            },
            "downloads": -1,
            "filename": "vws-python-mock-2024.2.16.tar.gz",
            "has_sig": false,
            "md5_digest": "9ffcd2eb6724ac28d657512739fbc424",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 125612,
            "upload_time": "2024-02-16T21:17:06",
            "upload_time_iso_8601": "2024-02-16T21:17:06.515465Z",
            "url": "https://files.pythonhosted.org/packages/3e/38/d26650e82a3f8396da6b5dfa52e8cbef6222ed8fd538071b219a612fbd72/vws-python-mock-2024.2.16.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-16 21:17:06",
    "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"
}
        
Elapsed time: 0.19284s