Skip to main content

Official Python client for the EmailZeno bulk SMTP email verification API

Project description

EmailZeno Python SDK

Official Python client for the EmailZeno real-time SMTP email verification API. Every probe uses EHLO → MAIL FROM → RCPT TO → QUIT — no DATA is ever sent, so your sender reputation stays clean.

PyPI Python License

Install

pip install emailzeno

Quickstart

from emailzeno import EmailZeno

client = EmailZeno(api_key="ec_live_xxx")

result = client.verify("someone@example.com")
print(result.status, result.state, result.quality_score)

result exposes both EmailZeno fields (status, quality_score, signals, …) and Emailable-compatible aliases (state, reason, score, …). Use result.is_deliverable() for a quick boolean.

Bulk verification

Bulk is asynchronous: submit returns a job handle (not results). Poll for results.

from emailzeno import EmailZeno

client = EmailZeno(api_key="ec_live_xxx")

job = client.verify_bulk(["a@example.com", "b@example.com"])  # list, or a CSV string

# Poll until the job reaches a terminal state (raises on failed/cancelled, bounded by timeout).
status = client.wait_for_job(job.job_id, poll_interval=2.0, timeout=300)

page = client.get_job_results(job.job_id, page=1, per_page=50)
for row in page.items:
    print(row)

# Or fetch the full result set as CSV:
csv_text = client.export_job_results(job.job_id)

A test-mode (ec_test_) key returns results inline in the verify_bulk response (job.results, job.test_mode is True) instead of a job handle — check job.test_mode before polling.

Error handling

from emailzeno import (
    EmailZeno,
    AuthenticationError,
    InsufficientCreditsError,
    RateLimitError,
    ValidationError,
    ServiceUnavailableError,
    EmailZenoError,
)

client = EmailZeno(api_key="ec_live_xxx")

try:
    result = client.verify("someone@example.com")
except InsufficientCreditsError as e:
    print(f"Need {e.required} credits, have {e.balance}")
except RateLimitError as e:
    print(f"Rate limited, retry after {e.retry_after}s")
except ValidationError as e:
    print(e.errors)
except (AuthenticationError, ServiceUnavailableError, EmailZenoError) as e:
    print(f"Verification failed: {e.message}")

Exceptions: AuthenticationError (401), InsufficientCreditsError (402), PermissionError (403), ValidationError (422), RateLimitError (429, exposes retry_after), ServiceUnavailableError (503/504) — all extend EmailZenoError.

Retry note: the SDK auto-retries only idempotent GETs. verify / verify_bulk / autoresponder pushes are never auto-retried (they charge credits / write to third parties) — handle their failures yourself.

Migrating from Emailable

Change the base URL to https://app.emailzeno.com/api and use an ec_live_ key. The response includes Emailable-style state / reason / score fields, so most code needs no other change.

Get an API key

Sign up at emailzeno.comAPI & Usage. Keys are prefixed ec_live_ (production) or ec_test_ (test mode — synthetic results, no credits used).

Links

License

MIT — see LICENSE.

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

emailzeno-0.1.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

emailzeno-0.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for emailzeno-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea057fdb0ec3975d9e1f9b1b0bb1fdf9a5245bdc1cedaaa8a12ac3c3dc343b35
MD5 6e425e53ff0812a8b11cceebdc257f1a
BLAKE2b-256 67d0dad9e30a873900864cd24190235ce80d8d08c13bd93d3996813d4b84b466

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for emailzeno-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5576da1cbc38e2a65320e019af4cb99588882cd98e6f11b018966c670ea9d180
MD5 a1973057f5422a583d0482dba207cbf9
BLAKE2b-256 11d825f698a07f3a242bb165f81428993cfa7f05456040b9e3c0aab967c1a69b

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