Metadata-Version: 2.4
Name: scanverion
Version: 0.1.0
Summary: Python client for the Scanverion OCR API.
Author: Scanverion
License: Apache-2.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# scanverion

Node and Python are the first supported Scanverion client languages. This package provides synchronous and asynchronous standard-library clients for the OCR API.

## Download and install

Install the published package from PyPI:

```powershell
python -m pip install scanverion==0.1.0
```

It requires Python 3.10 or newer.

## Quickstart

```python
from pathlib import Path
from scanverion import Scanverion

client = Scanverion(
    api_key="skv_...",
    base_url="http://localhost:5009",
)
result = client.documents.process(
    Path("invoice.pdf"),
    file_name="invoice.pdf",
    content_type="application/pdf",
    operations=["Detection", "Scanner"],
    scanner_fields=["invoiceNumber", "grossTotal"],
    idempotency_key="invoice-2026-0007",
)
print(result["requestId"], result["objects"])
```

The core methods accept `bytes`, `bytearray`, `memoryview`, `pathlib.Path`, or binary file objects. `AsyncScanverion` exposes the same resource groups and uses an injected async transport or `asyncio.to_thread` with the default transport.

```python
from scanverion import AsyncScanverion

async with AsyncScanverion(api_key="skv_...") as client:
    summary = await client.usage.summary(from_date="2026-07-01", to_date="2026-07-31")
```

API keys are server-side credentials. Do not put them in browser code, mobile binaries, logs, or public fixtures. Processing POST retries happen only when an idempotency key is supplied; safe GET resources may retry transient failures.

## Local validation

From the `scanverion` directory:

```powershell
python -m unittest discover -s packages/sdk-python/tests -v
python -m compileall packages/sdk-python/src
```
