Skip to main content

Resend Python SDK

Code style: black Build codecov License: MIT PyPI PyPI - Python Version


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.47.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for resend 2.47.0
File Size Uploaded
resend-2.47.0.tar.gz 61.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for resend 2.47.0
File Interpreter ABI Platform
resend-2.47.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 154.9 kB

Release files / resend-2.47.0.tar.gz

Download URL resend-2.47.0.tar.gz
Size 61.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c92900e1c45f6c77e09cbfb29467671b87a62ee21baf8959e60047f3667fb652
BLAKE2b-256 checksum
How to use checksums
08d712f9decf70586a3ff5c9ec315d6751e026f906f7395b78334e39cb2647c4
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 18, 2026.

Transparency log

Release files / resend-2.47.0-py2.py3-none-any.whl

Download URL resend-2.47.0-py2.py3-none-any.whl
Size 93.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
04369afdff1741bc21c83dc68effad3b1635057b2db0f9d70b6be611310c9aed
BLAKE2b-256 checksum
How to use checksums
aca928c1e359a3d972931c2c586f11efc08066c2e1ca9de7701ef0fbe923d814
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 18, 2026.

Transparency log

Release history Release notifications | RSS feed

2.48.0

2 release files

This release

2.47.0 This release

2 release files

2.46.0

2 release files

2.45.1

2 release files

2.45.0

2 release files

2.44.0

2 release files

2.42.0

2 release files

2.41.0

2 release files

2.40.2

2 release files

2.40.1

2 release files

2.40.0

2 release files

2.39.0

2 release files

2.38.0

2 release files

2.37.0

2 release files

2.36.0

2 release files

2.35.0

2 release files

2.34.0

2 release files

2.33.0

2 release files

2.32.2

2 release files

2.32.1

2 release files

2.32.0

2 release files

2.31.0

2 release files

2.30.1

2 release files

2.29.0

2 release files

2.28.1

2 release files

2.28.0

2 release files

2.26.0

2 release files

2.25.0

2 release files

2.24.0

2 release files

2.23.0

2 release files

2.22.0

2 release files

2.21.0

2 release files

2.19.0

2 release files

2.18.0

2 release files

2.17.0

2 release files

2.15.0

2 release files

2.14.0

2 release files

2.13.1

2 release files

2.13.0

2 release files

2.11.0

2 release files

2.10.0

2 release files

2.9.0

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.2

1 release file

0.5.1

1 release file

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page