# resend

> Resend Python SDK

- **URL**: https://www.freshcrate.ai/projects/resend
- **Author**: Derich Pacheco
- **Category**: Frameworks
- **Latest version**: `v2.30.1` (2026-05-13)
- **License**: Unknown
- **Source**: https://github.com/resendlabs/resend-python
- **Language**: Python
- **GitHub**: 118 stars, 15 forks
- **Registry**: pypi (`resend`)
- **Tags**: `email`, `platform`, `pypi`

## Description

# Resend Python SDK

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![Build](https://github.com/drish/resend-py/actions/workflows/ci.yaml/badge.svg)
[![codecov](https://codecov.io/gh/drish/resend-py/branch/main/graph/badge.svg?token=GGD39PPFM0)](https://codecov.io/gh/drish/resend-py)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![PyPI](https://img.shields.io/pypi/v/resend)](https://pypi.org/project/resend/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/resend)](https://pypi.org/project/resend)

---

## 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](https://resend.com).

```py
import resend
import os

resend.api_key = "re_yourkey"
```

## Example

You can get an overview about all parameters in the [Send Email](https://resend.com/docs/api-reference/emails/send-email) API reference.

```py
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:

```bash
pip install resend[async]
```

Once installed, async methods (suffixed with `_async`) work automatically — no extra setup needed:

```py
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`:

```py
import resend

resend.api_key = "re_yourkey"
resend.default_async_http_client = resend.HTTPXClient(timeout=60)
```

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v2.30.1` | 2026-05-13 | High | ## What's Changed * chore: GH Actions hardening — pin actions to SHA, add permissions and timeouts by @dielduarte in https://github.com/resend/resend-python/pull/204 * fix(emails): make filename and content_disposition nullable in EmailAttachment types by @dielduarte in https://github.com/resend/resend-python/pull/205 * chore(deps): update python docker tag to v3.14.5 by @renovate[bot] in https://github.com/resend/resend-python/pull/196 * chore: bump version to 2.30.1 by @drish in https://gi |
| `v2.30.0` | 2026-05-04 | High | ## What's Changed * feat(contacts): add segment_id support to Contacts.list by @drish in https://github.com/resend/resend-python/pull/202 * chore: bump version to 2.30.0 by @drish in https://github.com/resend/resend-python/pull/203   **Full Changelog**: https://github.com/resend/resend-python/compare/v2.29.0...v2.30.0 |
| `2.29.0` | 2026-04-21 | Low | Imported from PyPI (2.29.0) |
| `v2.29.0` | 2026-04-16 | High | ## What's Changed * feat(domains): add click_tracking and open_tracking to CreateParams by @rehanvdm in https://github.com/resend/resend-python/pull/200   **Full Changelog**: https://github.com/resend/resend-python/compare/v2.28.1...v2.29.0 |
| `v2.29.0` | 2026-04-16 | Medium | ## What's Changed * feat(domains): add click_tracking and open_tracking to CreateParams by @rehanvdm in https://github.com/resend/resend-python/pull/200   **Full Changelog**: https://github.com/resend/resend-python/compare/v2.28.1...v2.29.0 |
| `v2.29.0` | 2026-04-16 | Medium | ## What's Changed * feat(domains): add click_tracking and open_tracking to CreateParams by @rehanvdm in https://github.com/resend/resend-python/pull/200   **Full Changelog**: https://github.com/resend/resend-python/compare/v2.28.1...v2.29.0 |
| `v2.29.0` | 2026-04-16 | Medium | ## What's Changed * feat(domains): add click_tracking and open_tracking to CreateParams by @rehanvdm in https://github.com/resend/resend-python/pull/200   **Full Changelog**: https://github.com/resend/resend-python/compare/v2.28.1...v2.29.0 |
| `v2.29.0` | 2026-04-16 | Medium | ## What's Changed * feat(domains): add click_tracking and open_tracking to CreateParams by @rehanvdm in https://github.com/resend/resend-python/pull/200   **Full Changelog**: https://github.com/resend/resend-python/compare/v2.28.1...v2.29.0 |
| `v2.29.0` | 2026-04-16 | Medium | ## What's Changed * feat(domains): add click_tracking and open_tracking to CreateParams by @rehanvdm in https://github.com/resend/resend-python/pull/200   **Full Changelog**: https://github.com/resend/resend-python/compare/v2.28.1...v2.29.0 |
| `v2.29.0` | 2026-04-16 | Medium | ## What's Changed * feat(domains): add click_tracking and open_tracking to CreateParams by @rehanvdm in https://github.com/resend/resend-python/pull/200   **Full Changelog**: https://github.com/resend/resend-python/compare/v2.28.1...v2.29.0 |

## Citation

- HTML: https://www.freshcrate.ai/projects/resend
- Markdown: https://www.freshcrate.ai/projects/resend.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/resend/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
