Python email API
Send transactional email with Python
Use the zasend PyPI package from server-side Python code: Flask views, Django services, FastAPI background tasks, Celery jobs, scripts, and workers.
Install
pip install zasend
Good Python fits
- Flask account verification and password reset email
- Django notifications, receipts, and login codes
- FastAPI background tasks after signup or checkout
- Celery or RQ workers sending transactional email outside the request path
from zasend import ZaSend
client = ZaSend("sk_live_...")
client.send_email(
from_email="Acme <noreply@acme.com>",
to="user@example.com",
subject="Reset your password",
html="<p>Click the secure reset link.</p>",
text="Click the secure reset link.",
)
Production tip
Send email from a job queue when possible. It keeps signup, checkout, and password reset requests fast, and it gives you one place to retry failures safely.