Skip to main content
This guide shows how to install and use the official usesend Python SDK.

Installation

Install from PyPI:

Initialize

Send an email

EmailCreate is a TypedDict for editor hints; at runtime you pass a regular dict. The client accepts from or from_ (it normalizes from_ to from).
useSend forwards your custom headers to SES. Only the X-Usesend-Email-ID and References headers are managed automatically. Attachments and scheduling:

Batch send

Retrieve and manage emails

Get an email:
Update schedule time:
Cancel a scheduled email:

Contacts

All contact operations require a contact book ID (book_id). Create a contact:
Get a contact:
Update a contact:
Upsert a contact:
Delete a contact:

Error handling

By default the client raises UseSendHTTPError for non-2xx responses. To handle errors as return values, pass raise_on_error=False.