Async Support for the Python SDK

Send emails asynchronously in Python using the new async methods powered by httpx.

The Python SDK now supports async out of the box. If you are building with FastAPI, async Django, or any other async Python framework, you can now send emails without blocking your event loop.

Installation

Install the SDK with the async extra to pull in httpx:

pip install "resend[async]"

Sending an email asynchronously

Every method in the SDK has an _async counterpart. Await it like any other coroutine:

import asyncio
import resend
resend.api_key = "re_your_api_key"
async def main():
params: resend.Emails.SendParams = {
"from": "onboarding@resend.dev",
"to": ["delivered@resend.dev"],
"subject": "Hello from async Python",
"html": "<strong>it works!</strong>",
}
email = await resend.Emails.send_async(params)
print(email)
asyncio.run(main())

Batch sending

The same pattern applies to batch sends:

emails = await resend.Batch.send_async([params1, params2])

Custom timeout

If you need to configure the underlying HTTP client, you can swap in your own instance:

resend.default_async_http_client = resend.HTTPXClient(timeout=60)

No breaking changes

The existing sync API is unchanged — resend.Emails.send(params) continues to work exactly as before. Async is opt-in: if httpx is not installed, calling an _async method raises a ResendError with code AsyncClientNotConfigured.

All SDK modules have async counterparts: Emails, Batch, ApiKeys, Audiences, Broadcasts, Contacts, and Domains.

Check the Python SDK on GitHub if you want to follow along or open an issue.

Async Support for the Python SDK · Resend