Metadata-Version: 2.4
Name: pywats-api
Version: 1.0.0rc2
Summary: Python API library for WATS - manufacturing test data management
Author: The WATS Company AS
Maintainer: The WATS Company AS
License: MIT License
        
        Copyright (c) 2024-2026 The WATS Company AS
        
        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.
        
Project-URL: Homepage, https://www.wats.com
Project-URL: Release history, https://pypi.org/project/pywats-api/#history
Keywords: wats,test-automation,manufacturing,test-data,api
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx[http2]<1,>=0.24.0
Requires-Dist: pydantic<3,>=2.0.0
Provides-Extra: observability
Requires-Dist: prometheus-client>=0.19.0; extra == "observability"
Provides-Extra: client
Requires-Dist: pywats-client[html]; extra == "client"
Provides-Extra: client-html
Requires-Dist: pywats-client[html]; extra == "client-html"
Provides-Extra: client-headless
Requires-Dist: pywats-client; extra == "client-headless"
Provides-Extra: qt
Requires-Dist: pywats-client[qt]; extra == "qt"
Dynamic: license-file

# pywats-api

Python API for [WATS](https://wats.com), the manufacturing test data management platform: create and
submit test reports (UUT/UUR), query reports and analytics, manage products, production units, assets,
software distribution, root cause tickets and more. Async first (`AsyncWATS`) with a synchronous
facade (`pyWATS`).

```python
from pywats import pyWATS

api = pyWATS(base_url="https://your.wats.server", token="...")
print(api.get_version())
headers = api.report.get_recent_headers(days=7, top=100)
```

```python
import asyncio
from pywats import AsyncWATS

async def main():
    async with AsyncWATS(base_url="https://your.wats.server", token="...") as api:
        products = await api.product.get_products()

asyncio.run(main())
```

Conventions of the 1.0 API (the same everywhere):

- Import from the top-level `pywats` package (`from pywats import pyWATS, UUTReport, ValidationError`) or from `pywats.domains.<domain>`.
- Optional parameters are keyword-only; the same concept has the same name (`date_from` / `date_to`, `top`, `odata_filter`, `process_code`, `quantity`).
- Errors raise (`ErrorMode.STRICT` is the default); `delete_*` returns `bool`; `create_*` / `update_*` return the model.
- Exceptions derive from `PyWATSError` (`WatsApiError` for HTTP errors, `WatsConnectionError`, `WatsTimeoutError`, `ConfigurationError`); `ValidationError` is also a `ValueError`.
- Methods whose docstring says "Uses an internal WATS endpoint" and the `manual_inspection` preview are outside SemVer.

- Python 3.11 or later
- Server compatibility: `pywats-api 1.0.x` is tested against WATS 2026.3
- Needs the WATS client on a test station? Install the separate package `pywats-client`.
- Questions and problems: contact WATS support (https://www.wats.com)
