Skip to main content

Official Checkharbor Python SDK — email/phone/IP validation

Project description

checkharbor

Official Checkharbor Python SDK.

Install

pip install checkharbor

Quick start

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

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

checkharbor-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

checkharbor-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file checkharbor-0.1.0.tar.gz.

File metadata

  • Download URL: checkharbor-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for checkharbor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c446cdc335e95963f26a134e596c80fd21fa80649521c5f456f35f8623d4dfda
MD5 d6c010004689d2ee1a8e09474f563a9f
BLAKE2b-256 583916a18547d05dc70affd37b7a773439aa61711cd1a1659264e648b9d7e524

See more details on using hashes here.

File details

Details for the file checkharbor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: checkharbor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for checkharbor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8eb861cac4ac4994cc91a0d07aca928641f4692e47b62c53fbc7b532ea088843
MD5 364c63c71cd3f63660a4df14b201569a
BLAKE2b-256 f80b216db9a05dd96a2713b1f4f7b7b045421505c43dea4e4fab90888c32eee5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page