Skip to main content
wazobiamail is the official Python SDK: a synchronous, fully typed client with zero runtime dependencies (standard library only). It is a good fit for Django, FastAPI, Flask, background workers and one-off scripts.

PyPI package

wazobiamail — version 0.1.0

Source

WazobiaMail/wazobiamail-python

At a glance

Install

Configure

Send your first email

What you can do

  • client.messages — send, multipart attachments, spam check, tracking, email logs.
  • client.domains — create/list/verify domains, DNS records, Cloudflare sync.
  • client.mailboxes — provision mailboxes, credentials, storage, headless inbox.
  • client.templates, client.tracking, client.webhooks — templates and verification.
  • client.billing, client.units, client.plans, client.api_keys, client.smtp_relays, client.smtp_access, client.support, client.status.

Django

Use the client from sync views, forms signals or Celery/RQ tasks. A single module-level client is fine because each request uses a short-lived connection.
In an async def Django view:

FastAPI

The SDK is synchronous. Use a normal def endpoint (FastAPI runs it in a threadpool) or run_in_threadpool from an async endpoint:

Webhooks

Verify the raw request body before parsing JSON. Django:
FastAPI:

Errors

Catch WazobiaError for all SDK exceptions, or specific classes such as WazobiaAuthenticationError, WazobiaValidationError, WazobiaRateLimitError, WazobiaTimeoutError, WazobiaConnectionError and WazobiaServerError. Webhook verification raises WazobiaWebhookError.