MailOdds
Python
Enterprise SDK

Python Email Validation SDK

Validate emails in 3 lines of Python. Enterprise-grade SDK with retry, typed errors, and webhook verification.

Install

Install the MailOdds SDK from PyPI. Requires Python 3.7 or later.

Terminal
pip install mailodds

Quick Start: Validate a Single Email

Three lines to validate any email address. The SDK performs syntax, DNS, and SMTP mailbox checks in a single call.

Python
from mailodds import MailOdds

client = MailOdds(api_key="YOUR_API_KEY")
result = client.validate("user@example.com")

print(f"Status: {result.status}")
print(f"Action: {result.action}")
print(f"Disposable: {result.disposable}")

Bulk Validation

Upload a CSV file and stream progress events. Download results when the job completes.

Python
job = client.batch.create("contacts.csv")

# Track progress
for event in client.batch.stream(job.id):
    print(f"Progress: {event.progress}%")

# Download results
results = client.batch.results(job.id)

SDK Features

Built-in retry with exponential backoff
Automatic retries for 429 and 5xx responses with configurable backoff
Typed error classes
InsufficientCreditsError, RateLimitError, AuthenticationError, MailOddsError
Webhook HMAC-SHA256 verification
Verify webhook signatures with a single method call
Async support via asyncio
Non-blocking validation for FastAPI, aiohttp, and ASGI frameworks

Frequently Asked Questions

Start validating emails in Python

Install the SDK and validate your first email in under 2 minutes. Free tier included, no credit card required.