vws-python 2023.3.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. vws-python-2023.3.5/.git_archival.txt +1 -0
  2. vws-python-2023.3.5/.gitattributes +1 -0
  3. vws-python-2023.3.5/.github/dependabot.yml +12 -0
  4. vws-python-2023.3.5/.github/workflows/ci.yml +59 -0
  5. vws-python-2023.3.5/.github/workflows/release.yml +76 -0
  6. vws-python-2023.3.5/.github/workflows/windows-ci.yml +52 -0
  7. vws-python-2023.3.5/.gitignore +111 -0
  8. vws-python-2023.3.5/CHANGELOG.rst +48 -0
  9. vws-python-2023.3.5/CODE_OF_CONDUCT.rst +47 -0
  10. vws-python-2023.3.5/LICENSE +20 -0
  11. vws-python-2023.3.5/MANIFEST.in +3 -0
  12. vws-python-2023.3.5/Makefile +34 -0
  13. vws-python-2023.3.5/PKG-INFO +110 -0
  14. vws-python-2023.3.5/README.rst +71 -0
  15. vws-python-2023.3.5/codecov.yaml +6 -0
  16. vws-python-2023.3.5/docs/Makefile +20 -0
  17. vws-python-2023.3.5/docs/source/__init__.py +1 -0
  18. vws-python-2023.3.5/docs/source/api-reference.rst +14 -0
  19. vws-python-2023.3.5/docs/source/changelog.rst +1 -0
  20. vws-python-2023.3.5/docs/source/conf.py +96 -0
  21. vws-python-2023.3.5/docs/source/contributing.rst +75 -0
  22. vws-python-2023.3.5/docs/source/exceptions.rst +38 -0
  23. vws-python-2023.3.5/docs/source/index.rst +107 -0
  24. vws-python-2023.3.5/docs/source/release-process.rst +22 -0
  25. vws-python-2023.3.5/lint.mk +59 -0
  26. vws-python-2023.3.5/pyproject.toml +229 -0
  27. vws-python-2023.3.5/readthedocs.yaml +17 -0
  28. vws-python-2023.3.5/requirements/dev-requirements.txt +28 -0
  29. vws-python-2023.3.5/requirements/requirements.txt +4 -0
  30. vws-python-2023.3.5/requirements/setup-requirements.txt +2 -0
  31. vws-python-2023.3.5/setup.cfg +4 -0
  32. vws-python-2023.3.5/setup.py +38 -0
  33. vws-python-2023.3.5/spelling_private_dict.txt +99 -0
  34. vws-python-2023.3.5/src/vws/__init__.py +11 -0
  35. vws-python-2023.3.5/src/vws/exceptions/__init__.py +3 -0
  36. vws-python-2023.3.5/src/vws/exceptions/base_exceptions.py +51 -0
  37. vws-python-2023.3.5/src/vws/exceptions/cloud_reco_exceptions.py +41 -0
  38. vws-python-2023.3.5/src/vws/exceptions/custom_exceptions.py +33 -0
  39. vws-python-2023.3.5/src/vws/exceptions/vws_exceptions.py +166 -0
  40. vws-python-2023.3.5/src/vws/include_target_data.py +16 -0
  41. vws-python-2023.3.5/src/vws/py.typed +0 -0
  42. vws-python-2023.3.5/src/vws/query.py +185 -0
  43. vws-python-2023.3.5/src/vws/reports.py +116 -0
  44. vws-python-2023.3.5/src/vws/vws.py +661 -0
  45. vws-python-2023.3.5/src/vws_python.egg-info/PKG-INFO +110 -0
  46. vws-python-2023.3.5/src/vws_python.egg-info/SOURCES.txt +55 -0
  47. vws-python-2023.3.5/src/vws_python.egg-info/dependency_links.txt +1 -0
  48. vws-python-2023.3.5/src/vws_python.egg-info/not-zip-safe +1 -0
  49. vws-python-2023.3.5/src/vws_python.egg-info/requires.txt +34 -0
  50. vws-python-2023.3.5/src/vws_python.egg-info/top_level.txt +1 -0
  51. vws-python-2023.3.5/tests/__init__.py +1 -0
  52. vws-python-2023.3.5/tests/conftest.py +43 -0
  53. vws-python-2023.3.5/tests/test_cloud_reco_exceptions.py +135 -0
  54. vws-python-2023.3.5/tests/test_meta.py +22 -0
  55. vws-python-2023.3.5/tests/test_query.py +304 -0
  56. vws-python-2023.3.5/tests/test_vws.py +570 -0
  57. vws-python-2023.3.5/tests/test_vws_exceptions.py +358 -0
@@ -0,0 +1 @@
1
+ ref-names: $Format:%D$
@@ -0,0 +1 @@
1
+ .git_archival.txt export-subst
@@ -0,0 +1,12 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: pip
4
+ directory: "/requirements"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: daily
12
+ open-pull-requests-limit: 10
@@ -0,0 +1,59 @@
1
+ ---
2
+
3
+ name: CI
4
+
5
+ on:
6
+ push:
7
+ branches: [master]
8
+ pull_request:
9
+ branches: [master]
10
+ schedule:
11
+ # * is a special character in YAML so you have to quote this string
12
+ # Run at 1:00 every day
13
+ - cron: '0 1 * * *'
14
+
15
+ jobs:
16
+ build:
17
+
18
+ strategy:
19
+ matrix:
20
+ python-version: ["3.11"]
21
+ platform: [ubuntu-latest]
22
+
23
+ runs-on: ${{ matrix.platform }}
24
+
25
+ steps:
26
+ - uses: actions/checkout@v3
27
+ - name: "Set up Python"
28
+ uses: actions/setup-python@v4
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+
32
+ - uses: actions/cache@v3
33
+ with:
34
+ path: ~/.cache/pip
35
+ # This is like the example but we use ``*requirements.txt`` rather
36
+ # than ``requirements.txt`` because we have multiple requirements
37
+ # files.
38
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
39
+ restore-keys: |
40
+ ${{ runner.os }}-pip-
41
+
42
+ - name: "Install dependencies"
43
+ run: |
44
+ python -m pip install --upgrade pip setuptools wheel
45
+ # We use '--ignore-installed' to avoid GitHub's cache which can cause
46
+ # issues - we have seen packages from this cache be cause trouble with
47
+ # pip-extra-reqs.
48
+ python -m pip install --ignore-installed --upgrade --editable .[dev]
49
+
50
+ - name: "Lint"
51
+ run: |
52
+ make lint
53
+
54
+ - name: "Run tests"
55
+ run: |
56
+ pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests tests/ --cov-report=xml
57
+
58
+ - name: "Upload coverage to Codecov"
59
+ uses: "codecov/codecov-action@v3"
@@ -0,0 +1,76 @@
1
+ ---
2
+
3
+ name: Release
4
+
5
+ on: workflow_dispatch
6
+
7
+ jobs:
8
+ build:
9
+ name: Publish a release
10
+ runs-on: ubuntu-latest
11
+
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.11"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+
19
+ - name: "Set up Python"
20
+ uses: actions/setup-python@v4
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: "Calver calculate version"
25
+ uses: StephaneBour/actions-calver@master
26
+ id: calver
27
+ with:
28
+ date_format: "%Y.%m.%d"
29
+ release: false
30
+ env:
31
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32
+
33
+ - name: "Update changelog"
34
+ uses: jacobtomlinson/gha-find-replace@v3
35
+ env:
36
+ NEXT_VERSION: ${{ steps.calver.outputs.release }}
37
+ with:
38
+ find: "Next\n----"
39
+ replace: "Next\n----\n\n${{ env.NEXT_VERSION }}\n------------"
40
+ include: "CHANGELOG.rst"
41
+ regex: false
42
+
43
+ - uses: stefanzweifel/git-auto-commit-action@v4
44
+ id: commit
45
+ with:
46
+ commit_message: Bump CHANGELOG
47
+
48
+ - name: Bump version and push tag
49
+ id: tag_version
50
+ uses: mathieudutour/github-tag-action@v6.1
51
+ with:
52
+ github_token: ${{ secrets.GITHUB_TOKEN }}
53
+ custom_tag: ${{ steps.calver.outputs.release }}
54
+ tag_prefix: ""
55
+ commit_sha: ${{ steps.commit.outputs.commit_hash }}
56
+
57
+ - name: Create a GitHub release
58
+ uses: ncipollo/release-action@v1
59
+ with:
60
+ tag: ${{ steps.tag_version.outputs.new_tag }}
61
+ name: Release ${{ steps.tag_version.outputs.new_tag }}
62
+ body: ${{ steps.tag_version.outputs.changelog }}
63
+
64
+ - name: Build a binary wheel and a source tarball
65
+ run: |
66
+ # Checkout the latest tag - the one we just created.
67
+ git fetch --tags
68
+ git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
69
+ python -m pip install build
70
+ python -m build --sdist --wheel --outdir dist/ .
71
+
72
+ - name: Publish distribution 📦 to PyPI
73
+ uses: pypa/gh-action-pypi-publish@master
74
+ with:
75
+ password: ${{ secrets.PYPI_API_TOKEN }}
76
+ verbose: true
@@ -0,0 +1,52 @@
1
+ ---
2
+
3
+ name: Windows CI
4
+
5
+ on:
6
+ push:
7
+ branches: [master]
8
+ pull_request:
9
+ branches: [master]
10
+ schedule:
11
+ # * is a special character in YAML so you have to quote this string
12
+ # Run at 1:00 every day
13
+ - cron: '0 1 * * *'
14
+
15
+ jobs:
16
+ build:
17
+
18
+ strategy:
19
+ matrix:
20
+ python-version: ["3.11"]
21
+ platform: [windows-latest]
22
+
23
+ runs-on: ${{ matrix.platform }}
24
+
25
+ steps:
26
+ - uses: actions/checkout@v3
27
+ - name: "Set up Python"
28
+ uses: actions/setup-python@v4
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+
32
+ - uses: actions/cache@v3
33
+ with:
34
+ path: ~\AppData\Local\pip\Cache
35
+ # This is like the example but we use ``*requirements.txt`` rather
36
+ # than ``requirements.txt`` because we have multiple requirements
37
+ # files.
38
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
39
+ restore-keys: |
40
+ ${{ runner.os }}-pip-
41
+
42
+ - name: "Install dependencies"
43
+ run: |
44
+ python -m pip install --upgrade pip setuptools wheel
45
+ # We use '--ignore-installed' to avoid GitHub's cache which can cause
46
+ # issues - we have seen packages from this cache be cause trouble with
47
+ # pip-extra-reqs.
48
+ python -m pip install --ignore-installed --upgrade --editable .[dev]
49
+
50
+ - name: "Run tests"
51
+ run: |
52
+ pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests tests/ --cov-report=xml
@@ -0,0 +1,111 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *,cover
47
+ .hypothesis/
48
+
49
+ # Translations
50
+ *.mo
51
+ *.pot
52
+
53
+ # Django stuff:
54
+ *.log
55
+ local_settings.py
56
+
57
+ # Flask stuff:
58
+ instance/
59
+ .webassets-cache
60
+
61
+ # Scrapy stuff:
62
+ .scrapy
63
+
64
+ # Sphinx documentation
65
+ docs/_build/
66
+
67
+ # PyBuilder
68
+ target/
69
+
70
+ # Jupyter Notebook
71
+ .ipynb_checkpoints
72
+
73
+ # pyenv
74
+ .python-version
75
+
76
+ # celery beat schedule file
77
+ celerybeat-schedule
78
+
79
+ # dotenv
80
+ .env
81
+
82
+ # virtualenv
83
+ .venv/
84
+ venv/
85
+ ENV/
86
+
87
+ # Spyder project settings
88
+ .spyderproject
89
+
90
+ # Rope project settings
91
+ .ropeproject
92
+
93
+ # Files containing secrets
94
+ vuforia_secrets.env
95
+ ci_secrets/
96
+ secrets.tar
97
+
98
+ # mypy
99
+ .mypy_cache/
100
+
101
+ # macOS attributes
102
+ *.DS_Store
103
+
104
+ # pyre
105
+ .pyre/
106
+
107
+ # pytest
108
+ .pytest_cache/
109
+
110
+ # setuptools_scm
111
+ src/*/_setuptools_scm_version.txt
@@ -0,0 +1,48 @@
1
+ Changelog
2
+ =========
3
+
4
+ Next
5
+ ----
6
+
7
+ 2023.03.05
8
+ ------------
9
+
10
+ 2021.03.28.2
11
+ ------------
12
+
13
+ 2021.03.28.1
14
+ ------------
15
+
16
+ 2021.03.28.0
17
+ ------------
18
+
19
+ * Breaking change: The ``vws.exceptions.cloud_reco_exceptions.MatchProcessing`` is now ``vws.exceptions.custom_exceptions.ActiveMatchingTargetsDeleteProcessing``.
20
+ * Added new exception ``vws.exceptions.custom_exceptions.RequestEntityTooLarge``.
21
+ * Add better exception handling when querying a server which does not serve the Vuforia API.
22
+
23
+ 2020.09.07.0
24
+ ------------
25
+
26
+ * Breaking change: Move exceptions and create base exceptions.
27
+ It is now possible to, for example, catch
28
+ ``vws.exceptions.base_exceptions.VWSException`` to catch many of the
29
+ exceptions raised by the ``VWS`` client.
30
+ Credit to ``@laymonage`` for this change.
31
+
32
+ 2020.08.21.0
33
+ ------------
34
+
35
+ * Change the return type of ``vws_client.get_target_record`` to match what is returned by the web API.
36
+
37
+ 2020.06.19.0
38
+ ------------
39
+
40
+ 2020.03.21.0
41
+ ------------
42
+
43
+ * Add Windows support.
44
+
45
+ 2019.11.23.0
46
+ ------------
47
+
48
+ * Make ``active_flag`` and ``application_metadata`` required on ``add_target``.
@@ -0,0 +1,47 @@
1
+ Contributor Covenant Code of Conduct
2
+ ====================================
3
+
4
+ Our Pledge
5
+ ----------
6
+
7
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
8
+
9
+ Our Standards
10
+ -------------
11
+
12
+ Examples of behavior that contributes to creating a positive environment include:
13
+
14
+ Using welcoming and inclusive language
15
+ Being respectful of differing viewpoints and experiences
16
+ Gracefully accepting constructive criticism
17
+ Focusing on what is best for the community
18
+ Showing empathy towards other community members
19
+ Examples of unacceptable behavior by participants include:
20
+
21
+ The use of sexualized language or imagery and unwelcome sexual attention or advances
22
+ Trolling, insulting/derogatory comments, and personal or political attacks
23
+ Public or private harassment
24
+ Publishing others' private information, such as a physical or electronic address, without explicit permission
25
+ Other conduct which could reasonably be considered inappropriate in a professional setting
26
+ Our Responsibilities
27
+
28
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
29
+
30
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
31
+
32
+ Scope
33
+ -----
34
+
35
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
36
+
37
+ Enforcement
38
+ -----------
39
+
40
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at adamdangoor@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
41
+
42
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
43
+
44
+ Attribution
45
+ -----------
46
+
47
+ This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4.
@@ -0,0 +1,20 @@
1
+ The MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
20
+
@@ -0,0 +1,3 @@
1
+ include src/vws/py.typed
2
+ include requirements/*.txt
3
+ include pyproject.toml
@@ -0,0 +1,34 @@
1
+ SHELL := /bin/bash -euxo pipefail
2
+
3
+ include lint.mk
4
+
5
+ # Treat Sphinx warnings as errors
6
+ SPHINXOPTS := -W
7
+
8
+ .PHONY: lint
9
+ lint: \
10
+ black \
11
+ check-manifest \
12
+ doc8 \
13
+ linkcheck \
14
+ mypy \
15
+ ruff \
16
+ pip-extra-reqs \
17
+ pip-missing-reqs \
18
+ pyroma \
19
+ spelling \
20
+ vulture \
21
+ pylint
22
+
23
+ .PHONY: fix-lint
24
+ fix-lint: \
25
+ fix-black \
26
+ fix-ruff
27
+
28
+ .PHONY: docs
29
+ docs:
30
+ make -C docs clean html SPHINXOPTS=$(SPHINXOPTS)
31
+
32
+ .PHONY: open-docs
33
+ open-docs:
34
+ python -c 'import os, webbrowser; webbrowser.open("file://" + os.path.abspath("docs/build/html/index.html"))'
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.1
2
+ Name: vws-python
3
+ Version: 2023.3.5
4
+ Summary: Interact with the Vuforia Web Services (VWS) API.
5
+ Author-email: Adam Dangoor <adamdangoor@gmail.com>
6
+ License: The MIT License
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+
26
+
27
+ Project-URL: Source, https://github.com/VWS-Python/vws-python
28
+ Project-URL: Documentation, https://vws-python.readthedocs.io/en/latest/
29
+ Keywords: vuforia,vws,client
30
+ Classifier: Operating System :: POSIX
31
+ Classifier: Environment :: Web Environment
32
+ Classifier: Programming Language :: Python :: 3.11
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Development Status :: 5 - Production/Stable
35
+ Requires-Python: >=3
36
+ Description-Content-Type: text/x-rst
37
+ Provides-Extra: dev
38
+ License-File: LICENSE
39
+
40
+ |Build Status| |codecov| |PyPI| |Documentation Status|
41
+
42
+ vws-python
43
+ ==========
44
+
45
+ Python library for the Vuforia Web Services (VWS) API and the Vuforia Web Query API.
46
+
47
+ Installation
48
+ ------------
49
+
50
+ .. code:: sh
51
+
52
+ pip install vws-python
53
+
54
+ This is tested on Python 3.11+.
55
+ Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language.
56
+
57
+ Getting Started
58
+ ---------------
59
+
60
+ .. code:: python
61
+
62
+ import io
63
+
64
+ from vws import VWS, CloudRecoService
65
+
66
+ server_access_key = '[server-access-key]'
67
+ server_secret_key = '[server-secret-key]'
68
+ client_access_key = '[client-access-key]'
69
+ client_secret_key = '[client-secret-key]'
70
+
71
+ vws_client = VWS(
72
+ server_access_key=server_access_key,
73
+ server_secret_key=server_secret_key,
74
+ )
75
+ cloud_reco_client = CloudRecoService(
76
+ client_access_key=client_access_key,
77
+ client_secret_key=client_secret_key,
78
+ )
79
+ name = 'my_image_name'
80
+
81
+ with open('/path/to/image.png', 'rb') as my_image_file:
82
+ my_image = io.BytesIO(my_image_file.read())
83
+
84
+ target_id = vws_client.add_target(
85
+ name=name,
86
+ width=1,
87
+ image=my_image,
88
+ active_flag=True,
89
+ application_metadata=None,
90
+ )
91
+ vws_client.wait_for_target_processed(target_id=target_id)
92
+ matching_targets = cloud_reco_client.query(image=my_image)
93
+
94
+ assert matching_targets[0].target_id == target_id
95
+
96
+
97
+ Full Documentation
98
+ ------------------
99
+
100
+ See the `full documentation <https://vws-python.readthedocs.io/en/latest>`__.
101
+
102
+ .. |Build Status| image:: https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg
103
+ :target: https://github.com/VWS-Python/vws-python/actions
104
+ .. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/master/graph/badge.svg
105
+ :target: https://codecov.io/gh/VWS-Python/vws-python
106
+ .. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest
107
+ :target: https://vws-python.readthedocs.io/en/latest/?badge=latest
108
+ :alt: Documentation Status
109
+ .. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg
110
+ :target: https://badge.fury.io/py/VWS-Python
@@ -0,0 +1,71 @@
1
+ |Build Status| |codecov| |PyPI| |Documentation Status|
2
+
3
+ vws-python
4
+ ==========
5
+
6
+ Python library for the Vuforia Web Services (VWS) API and the Vuforia Web Query API.
7
+
8
+ Installation
9
+ ------------
10
+
11
+ .. code:: sh
12
+
13
+ pip install vws-python
14
+
15
+ This is tested on Python 3.11+.
16
+ Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language.
17
+
18
+ Getting Started
19
+ ---------------
20
+
21
+ .. code:: python
22
+
23
+ import io
24
+
25
+ from vws import VWS, CloudRecoService
26
+
27
+ server_access_key = '[server-access-key]'
28
+ server_secret_key = '[server-secret-key]'
29
+ client_access_key = '[client-access-key]'
30
+ client_secret_key = '[client-secret-key]'
31
+
32
+ vws_client = VWS(
33
+ server_access_key=server_access_key,
34
+ server_secret_key=server_secret_key,
35
+ )
36
+ cloud_reco_client = CloudRecoService(
37
+ client_access_key=client_access_key,
38
+ client_secret_key=client_secret_key,
39
+ )
40
+ name = 'my_image_name'
41
+
42
+ with open('/path/to/image.png', 'rb') as my_image_file:
43
+ my_image = io.BytesIO(my_image_file.read())
44
+
45
+ target_id = vws_client.add_target(
46
+ name=name,
47
+ width=1,
48
+ image=my_image,
49
+ active_flag=True,
50
+ application_metadata=None,
51
+ )
52
+ vws_client.wait_for_target_processed(target_id=target_id)
53
+ matching_targets = cloud_reco_client.query(image=my_image)
54
+
55
+ assert matching_targets[0].target_id == target_id
56
+
57
+
58
+ Full Documentation
59
+ ------------------
60
+
61
+ See the `full documentation <https://vws-python.readthedocs.io/en/latest>`__.
62
+
63
+ .. |Build Status| image:: https://github.com/VWS-Python/vws-python/workflows/CI/badge.svg
64
+ :target: https://github.com/VWS-Python/vws-python/actions
65
+ .. |codecov| image:: https://codecov.io/gh/VWS-Python/vws-python/branch/master/graph/badge.svg
66
+ :target: https://codecov.io/gh/VWS-Python/vws-python
67
+ .. |Documentation Status| image:: https://readthedocs.org/projects/vws-python/badge/?version=latest
68
+ :target: https://vws-python.readthedocs.io/en/latest/?badge=latest
69
+ :alt: Documentation Status
70
+ .. |PyPI| image:: https://badge.fury.io/py/VWS-Python.svg
71
+ :target: https://badge.fury.io/py/VWS-Python
@@ -0,0 +1,6 @@
1
+ coverage:
2
+ status:
3
+ patch:
4
+ default:
5
+ # Require 100% test coverage.
6
+ target: 100%
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ SPHINXPROJ = VWSPYTHON
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1 @@
1
+ """Documentation."""