vws-python


Namevws-python JSON
Version 2024.2.19 PyPI version JSON
download
home_page
SummaryInteract with the Vuforia Web Services (VWS) API.
upload_time2024-02-19 19:37:04
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 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-python
==========

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

Installation
------------

.. code:: sh

   pip install vws-python

This is tested on Python 3.12+. Get in touch with
``adamdangoor@gmail.com`` if you would like to use this with another
language.

Getting Started
---------------

.. invisible-code-block: python

   import contextlib
   import pathlib
   import shutil

   import vws_test_fixtures
   from mock_vws import MockVWS
   from mock_vws.database import VuforiaDatabase

   mock = MockVWS(real_http=False)
   database = VuforiaDatabase(
       server_access_key='[server-access-key]',
       server_secret_key='[server-secret-key]',
       client_access_key='[client-access-key]',
       client_secret_key='[client-secret-key]',
   )
   mock.add_database(database=database)
   stack = contextlib.ExitStack()
   stack.enter_context(mock)

   # We rely on implementation details of the fixtures package.
   image = pathlib.Path(vws_test_fixtures.__path__[0]) / 'high_quality_image.jpg'
   assert image.exists(), image.resolve()
   new_image = pathlib.Path('high_quality_image.jpg')
   shutil.copy(image, new_image)


.. code-block:: python

   import pathlib

   from vws import VWS, CloudRecoService

   server_access_key = '[server-access-key]'
   server_secret_key = '[server-secret-key]'
   client_access_key = '[client-access-key]'
   client_secret_key = '[client-secret-key]'

   vws_client = VWS(
       server_access_key=server_access_key,
       server_secret_key=server_secret_key,
   )
   cloud_reco_client = CloudRecoService(
       client_access_key=client_access_key,
       client_secret_key=client_secret_key,
   )
   name = 'my_image_name'

   image = pathlib.Path('high_quality_image.jpg')
   with image.open(mode='rb') as my_image_file:
       target_id = vws_client.add_target(
           name=name,
           width=1,
           image=my_image_file,
           active_flag=True,
           application_metadata=None,
       )
       vws_client.wait_for_target_processed(target_id=target_id)
       matching_targets = cloud_reco_client.query(image=my_image_file)

   assert matching_targets[0].target_id == target_id

.. invisible-code-block: python
   new_image = pathlib.Path('high_quality_image.jpg')
   new_image.unlink()
   stack.close()

Full Documentation
------------------

See the `full
documentation <https://vws-python.readthedocs.io/en/latest>`__.

.. |Build Status| image:: https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg
   :target: https://github.com/VWS-Python/vws-python/actions
.. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/main/graph/badge.svg
   :target: https://codecov.io/gh/VWS-Python/vws-python
.. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg
   :target: https://badge.fury.io/py/VWS-Python
.. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest
   :target: https://vws-python.readthedocs.io/en/latest/?badge=latest

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "vws-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": "",
    "keywords": "client,vuforia,vws",
    "author": "",
    "author_email": "Adam Dangoor <adamdangoor@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d2/cd/9e0fef8be88a6e6f79c402fad08c4b42797652ab451a4ed31e0d46ee43b2/vws-python-2024.2.19.tar.gz",
    "platform": null,
    "description": "|Build Status| |codecov| |PyPI| |Documentation Status|\n\nvws-python\n==========\n\nPython library for the Vuforia Web Services (VWS) API and the Vuforia\nWeb Query API.\n\nInstallation\n------------\n\n.. code:: sh\n\n   pip install vws-python\n\nThis is tested on Python 3.12+. Get in touch with\n``adamdangoor@gmail.com`` if you would like to use this with another\nlanguage.\n\nGetting Started\n---------------\n\n.. invisible-code-block: python\n\n   import contextlib\n   import pathlib\n   import shutil\n\n   import vws_test_fixtures\n   from mock_vws import MockVWS\n   from mock_vws.database import VuforiaDatabase\n\n   mock = MockVWS(real_http=False)\n   database = VuforiaDatabase(\n       server_access_key='[server-access-key]',\n       server_secret_key='[server-secret-key]',\n       client_access_key='[client-access-key]',\n       client_secret_key='[client-secret-key]',\n   )\n   mock.add_database(database=database)\n   stack = contextlib.ExitStack()\n   stack.enter_context(mock)\n\n   # We rely on implementation details of the fixtures package.\n   image = pathlib.Path(vws_test_fixtures.__path__[0]) / 'high_quality_image.jpg'\n   assert image.exists(), image.resolve()\n   new_image = pathlib.Path('high_quality_image.jpg')\n   shutil.copy(image, new_image)\n\n\n.. code-block:: python\n\n   import pathlib\n\n   from vws import VWS, CloudRecoService\n\n   server_access_key = '[server-access-key]'\n   server_secret_key = '[server-secret-key]'\n   client_access_key = '[client-access-key]'\n   client_secret_key = '[client-secret-key]'\n\n   vws_client = VWS(\n       server_access_key=server_access_key,\n       server_secret_key=server_secret_key,\n   )\n   cloud_reco_client = CloudRecoService(\n       client_access_key=client_access_key,\n       client_secret_key=client_secret_key,\n   )\n   name = 'my_image_name'\n\n   image = pathlib.Path('high_quality_image.jpg')\n   with image.open(mode='rb') as my_image_file:\n       target_id = vws_client.add_target(\n           name=name,\n           width=1,\n           image=my_image_file,\n           active_flag=True,\n           application_metadata=None,\n       )\n       vws_client.wait_for_target_processed(target_id=target_id)\n       matching_targets = cloud_reco_client.query(image=my_image_file)\n\n   assert matching_targets[0].target_id == target_id\n\n.. invisible-code-block: python\n   new_image = pathlib.Path('high_quality_image.jpg')\n   new_image.unlink()\n   stack.close()\n\nFull Documentation\n------------------\n\nSee the `full\ndocumentation <https://vws-python.readthedocs.io/en/latest>`__.\n\n.. |Build Status| image:: https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg\n   :target: https://github.com/VWS-Python/vws-python/actions\n.. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/main/graph/badge.svg\n   :target: https://codecov.io/gh/VWS-Python/vws-python\n.. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg\n   :target: https://badge.fury.io/py/VWS-Python\n.. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest\n   :target: https://vws-python.readthedocs.io/en/latest/?badge=latest\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": "Interact with the Vuforia Web Services (VWS) API.",
    "version": "2024.2.19",
    "project_urls": {
        "Documentation": "https://vws-python.readthedocs.io/en/latest/",
        "Source": "https://github.com/VWS-Python/vws-python"
    },
    "split_keywords": [
        "client",
        "vuforia",
        "vws"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9efe1492395ecd4b069f3853da54f7f7878561ff511ef6e80cd9e88589ec70f2",
                "md5": "c048033330667fa0d9930ed8fcc1d7e2",
                "sha256": "a8ac04f71682a3e0493b148aaa3cf3b58560e89322ce71abaaefb6a0e583c047"
            },
            "downloads": -1,
            "filename": "vws_python-2024.2.19-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c048033330667fa0d9930ed8fcc1d7e2",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.12",
            "size": 15902,
            "upload_time": "2024-02-19T19:37:02",
            "upload_time_iso_8601": "2024-02-19T19:37:02.976181Z",
            "url": "https://files.pythonhosted.org/packages/9e/fe/1492395ecd4b069f3853da54f7f7878561ff511ef6e80cd9e88589ec70f2/vws_python-2024.2.19-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2cd9e0fef8be88a6e6f79c402fad08c4b42797652ab451a4ed31e0d46ee43b2",
                "md5": "99db8050d4e9412e590f714607cb3ad4",
                "sha256": "cc765b30de513dc84c6ff030ee8cc3cc8d50bc5f8f9e5b7a0780eb5b20a986a3"
            },
            "downloads": -1,
            "filename": "vws-python-2024.2.19.tar.gz",
            "has_sig": false,
            "md5_digest": "99db8050d4e9412e590f714607cb3ad4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 32482,
            "upload_time": "2024-02-19T19:37:04",
            "upload_time_iso_8601": "2024-02-19T19:37:04.643320Z",
            "url": "https://files.pythonhosted.org/packages/d2/cd/9e0fef8be88a6e6f79c402fad08c4b42797652ab451a4ed31e0d46ee43b2/vws-python-2024.2.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-19 19:37:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "VWS-Python",
    "github_project": "vws-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "vws-python"
}
        
Elapsed time: 0.18491s