Metadata-Version: 2.4
Name: valydar
Version: 0.1.0a1
Summary: Valydar Identity Verification API client
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx<1,>=0.27
Requires-Dist: pydantic<3,>=2.0
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: httpx<1,>=0.27; extra == "test"

# Valydar Python SDK

Python client library for the Valydar Identity Verification API.

## Installation

```bash
pip install valydar
```

Or from source:

```bash
pip install ./sdk/python
```

## Quick Start

```python
from valydar import ValydarClient

client = ValydarClient(api_key="your-api-key")

# Check health
health = client.health()
print(health.status)

# Create a verification
verification = client.create_verification(
    client_reference="user-123",
    checks=["document", "face_match", "liveness"],
)
print(f"Verification: {verification.id}")

# Upload a document
doc = client.upload_document(
    verification.id,
    "/path/to/passport.jpg",
    document_type="passport",
)
print(f"Document: {doc.document_id}")

# Upload a selfie
selfie = client.upload_selfie(verification.id, "/path/to/selfie.jpg")

# Run face match
result = client.face_match(
    verification.id,
    doc.document_id,
    selfie["document_id"],
)
print(f"Face match: {result.passed}, confidence: {result.confidence}")
```

## API

### ValydarClient

| Method | Description |
|--------|-------------|
| `health()` | Check API health |
| `list_verifications()` | List all verifications |
| `create_verification(client_ref, checks)` | Create a new verification |
| `get_verification(id)` | Get verification status |
| `upload_document(ver_id, image_path, doc_type)` | Upload a document image |
| `upload_selfie(ver_id, image_path)` | Upload a selfie |
| `face_match(ver_id, doc_id, selfie_id)` | Run face comparison |
| `document_liveness(ver_id, doc_id)` | Check document liveness |
| `selfie_liveness(ver_id)` | Run passive selfie liveness |
| `deepfake(ver_id)` | Detect deepfake / AI-generated selfie |
| `verify_nfc(ver_id, expected_dg1)` | Verify ePassport NFC chip |
| `active_liveness_challenge(ver_id, type)` | Generate active liveness challenge |
| `active_liveness_verify(ver_id, challenge_id, frames)` | Verify active liveness |
| `demo_verify(document_path, selfie_path, checks)` | Run the public no-auth demo |
