Official Python SDK for the MailSentry email validation API
Project description
mailsentry
Official Python SDK for the MailSentry email validation API.
Installation
pip install mailsentry
Quick Start
from mailsentry import MailSentry
client = MailSentry(api_key="ms_live_your_key_here")
# Single verification
result = client.verify("user@example.com")
print(result["score"], result["verdict"])
# Bulk verification
bulk = client.bulk_verify([
"user1@example.com",
"user2@example.com",
"user3@example.com",
])
print(f"Validated {bulk['total']} emails")
# Get job details
job = client.get_bulk_job(bulk["id"])
# List recent jobs
jobs = client.list_bulk_jobs()
Configuration
client = MailSentry(
api_key="ms_live_your_key_here", # Required
base_url="https://mailsentry.dev", # Optional (default)
timeout=30, # Optional: request timeout in seconds (default: 30)
)
API Reference
verify(email) -> dict
Validates a single email address. Returns score (0-100), verdict, and detailed checks across 8 validation layers.
bulk_verify(emails, filename=None) -> dict
Validates multiple emails in one request. Batch size depends on your plan.
get_bulk_job(job_id) -> dict
Retrieves the full results of a bulk validation job.
list_bulk_jobs() -> list
Lists your 20 most recent bulk validation jobs.
Error Handling
from mailsentry import MailSentry, MailSentryError
try:
result = client.verify("user@example.com")
except MailSentryError as e:
print(f"API error {e.status}: {e}")
Links
- Documentation
- Sign up — 1,000 free checks/month
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mailsentry-1.0.0.tar.gz.
File metadata
- Download URL: mailsentry-1.0.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb3bcd985f0707abdae8497c2dd51d7f5f5033257895f2513451d234b1a02259
|
|
| MD5 |
77b1ae3bed1a909d1ac6ee3669a35167
|
|
| BLAKE2b-256 |
aab575cefc3cad395580ead9c61e2e8f11898f92f9e3eb974ba42b8bf2c2c78d
|
File details
Details for the file mailsentry-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mailsentry-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cba5854b19ac59bb997fffc771ed0874ad0e1b901ebd2bf10d27001fc64d51c
|
|
| MD5 |
54a432992eed2dbd2995c4fd7bdc0dfd
|
|
| BLAKE2b-256 |
7ec10bd0f24e3eb40d66cca7e4ae884fe2a0738ab0c1028bd5f68e2b377f7e60
|