Resend Python SDK
Installation
To install Resend Python SDK, simply execute the following command in a terminal:
pip install resend
Setup
First, you need to get an API key, which is available in the Resend Dashboard.
import resend
import os
resend.api_key = "re_yourkey"
Example
You can get an overview about all parameters in the Send Email API reference.
import os
import resend
resend.api_key = "re_yourkey"
params: resend.Emails.SendParams = {
"from": "onboarding@resend.dev",
"to": ["delivered@resend.dev"],
"subject": "hi",
"html": "<strong>hello, world!</strong>",
"reply_to": "to@gmail.com",
"bcc": "bcc@resend.dev",
"cc": ["cc@resend.dev"],
"tags": [
{"name": "tag1", "value": "tagvalue1"},
{"name": "tag2", "value": "tagvalue2"},
],
}
email: resend.Emails.SendResponse = resend.Emails.send(params)
print(email)
Async Support
The SDK supports async operations via httpx. Install the async extra:
pip install resend[async]
Once installed, async methods (suffixed with _async) work automatically — no extra setup needed:
import asyncio
import resend
resend.api_key = "re_yourkey"
async def main():
params: resend.Emails.SendParams = {
"from": "onboarding@resend.dev",
"to": ["delivered@resend.dev"],
"subject": "hi",
"html": "<strong>hello, world!</strong>",
}
email: resend.Emails.SendResponse = await resend.Emails.send_async(params)
print(email)
if __name__ == "__main__":
asyncio.run(main())
Custom async client
To use a custom async HTTP client or configure options like timeouts, set resend.default_async_http_client:
import resend
resend.api_key = "re_yourkey"
resend.default_async_http_client = resend.HTTPXClient(timeout=60)
Release files for resend 2.48.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| resend-2.48.0.tar.gz | 63.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| resend-2.48.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 158.6 kB
Release files / resend-2.48.0.tar.gz
| Download URL | resend-2.48.0.tar.gz |
|---|---|
| Size | 63.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a4a8ab1bfd70825f3e92e932cddcf7da36bc55f0afafa4a2df2f77e6f94997d
|
|
BLAKE2b-256 checksum How to use checksums |
54bff7edd6e360b70e6e437cb968221b9bc5c0c354c34178ccff095fb7104447
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / resend-2.48.0-py2.py3-none-any.whl
| Download URL | resend-2.48.0-py2.py3-none-any.whl |
|---|---|
| Size | 95.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ff44f36f36f4612a4479ed10564995cc60da829a5bd2815b559380f00e2eadd8
|
|
BLAKE2b-256 checksum How to use checksums |
8a97088ebb3ca6376d8b58265110479b2a7c4a4a4eb85632e3bd18d8b45b4a5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log