Metadata-Version: 2.4
Name: koraidv
Version: 1.5.2
Summary: Official Python SDK for the Kora IDV identity verification API
License: MIT
Project-URL: Homepage, https://korastratum.com
Project-URL: Documentation, https://docs.korastratum.com/idv
Project-URL: Repository, https://github.com/badedokun/koraidv
Project-URL: Issues, https://github.com/badedokun/koraidv/issues
Keywords: identity,verification,kyc,idv,kora
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT 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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"

# Kora IDV Python SDK

Official Python SDK for the [Kora IDV](https://korastratum.com/products/koraidv) identity verification API. Zero runtime dependencies — built on Python's standard library.

## Installation

```bash
pip install koraidv
```

Requires Python 3.10+.

## Quick start

```python
from koraidv import KoraIDVClient

client = KoraIDVClient(
    api_key="kora_sandbox_xxxxx",
    tenant_id="your-tenant-uuid",
)

# Create a verification — the client SDK will use this externalId to launch
# the mobile or web flow on the user's device.
verification = client.create_verification(
    external_id="user-42",
    tier="standard",  # "basic" | "standard" | "enhanced"
)
print(verification.id, verification.status)

# Poll or fetch by ID
fetched = client.get_verification(verification.id)
print(fetched.scores.overall if fetched.scores else None)
```

## Webhooks

Verify the HMAC-SHA256 signature on every event your endpoint receives:

```python
from koraidv import verify_webhook_signature, parse_webhook_payload

def handle_webhook(request):
    body = request.body  # raw bytes
    signature = request.headers["X-Korastratum-Signature"]

    if not verify_webhook_signature(body, signature, secret="whsec_xxx"):
        return 401

    event = parse_webhook_payload(body)
    if event.event_type == "verification.completed":
        process_verification(event.data)
    return 200
```

## Documentation

Full API reference and integration guides at
**[docs.korastratum.com/idv](https://docs.korastratum.com/idv)**.

Other Kora IDV SDKs:
- [`@koraidv/node`](https://www.npmjs.com/package/@koraidv/node) — Node.js / TypeScript
- [`koraidv-go`](https://github.com/badedokun/koraidv/tree/main/packages/go-sdk) — Go server SDK
- [`@koraidv/react-native`](https://www.npmjs.com/package/@koraidv/react-native) — React Native client
- [`@koraidv/core`](https://www.npmjs.com/package/@koraidv/core), [`@koraidv/react`](https://www.npmjs.com/package/@koraidv/react) — Web client

## License

MIT
