Metadata-Version: 2.4
Name: checkharbor
Version: 0.1.0
Summary: Official Checkharbor Python SDK — email/phone/IP validation
License: MIT
Project-URL: Homepage, https://checkharbor.com
Project-URL: Documentation, https://docs.checkharbor.com
Project-URL: Repository, https://github.com/checkharbor/checkharbor-python
Keywords: checkharbor,email-validation,phone-validation,ip-intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28

# checkharbor

Official Checkharbor Python SDK.

## Install

```bash
pip install checkharbor
```

## Quick start

```python
from checkharbor import Checkharbor

client = Checkharbor(api_key="chk_live_...")

# Validate email
email = client.validate_email("john@example.com")
print(email["score"], email["deliverability"])

# Validate phone
phone = client.validate_phone("+905321234567", country_hint="TR")

# IP intelligence
ip = client.ip_intel("84.17.45.10")

# Unified fraud check
fraud = client.verify(email="john@example.com", ip="84.17.45.10")
print(fraud["fraud_score"], fraud["risk"])

# Batch
job = client.batch.create(
    type="email",
    rows=["a@example.com", "b@example.com"],
    webhook_url="https://myapp.com/webhook",
)
done = client.batch.wait_until_done(job["id"])
csv = client.batch.download_result(done)
```

## Error handling

```python
from checkharbor import CheckharborError

try:
    result = client.validate_email("bad@test.com")
except CheckharborError as e:
    print(e.code, e.status, str(e))
    # e.g. "insufficient_credits" 402 "Not enough credits"
```

## Development

```bash
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest
```
