Resend Python SDK
Official Python SDK for sending transactional email with the Resend API
Repository Health
Technical Analysis
The Resend Python SDK is the official client library for Resend’s transactional email API, letting Python applications send emails, manage audiences/contacts, configure domains, and handle webhooks and broadcasts through a single typed client. It supports both synchronous and async (httpx-based) HTTP clients, so it fits equally into traditional Python scripts and asyncio-based web services.
Modeled closely on the underlying REST API, the SDK exposes resources like resend.Emails, resend.Domains, resend.Audiences, and resend.Webhooks as simple, discoverable modules, making it straightforward to integrate Resend’s email delivery platform into any Python codebase.
What You Get
- A simple
resend.Emails.send(...)call for sending transactional or batch emails - Resource modules for domains, audiences, contacts, broadcasts, templates, and API keys
- Both synchronous (
requests) and async (httpx) HTTP client support via an install extra - Webhook and event resource helpers for handling delivery/bounce/open events
- Typed responses and exceptions (
py.typed) for editor autocomplete and static analysis
Common Use Cases
- Sending transactional emails (password resets, receipts, notifications) from a Python backend
- Managing marketing email audiences and contact lists programmatically
- Verifying and configuring sending domains for deliverability from application code
- Processing Resend webhook events (delivered, bounced, opened) in a Python web service
- Sending templated broadcast emails to segments of subscribers
Under The Hood
Architecture - The SDK’s resend/ package exposes one submodule per API resource (emails, domains, audiences, contacts, broadcasts, webhooks, api_keys, etc.), each built on a shared _base_response.py/request.py layer that handles auth, serialization, and error mapping, with http_client.py, http_client_requests.py, and http_client_async.py providing swappable sync/async transport implementations. Tech Stack - The SDK depends only on requests for its default sync client plus typing_extensions, with httpx pulled in only via the optional async extra, keeping the base install lightweight; it ships py.typed for full type-checker support. Code Quality - Roughly 49 test files exercise each resource module plus both HTTP client implementations, with mypy configured (mypy.ini) for static type checking and a Dockerized dev environment (docker-compose.yaml) for consistent CI runs. API Design - Setting resend.api_key once and calling resend.Emails.send({...}) mirrors the shape of Resend’s own REST API almost one-to-one, so anyone who has read the Resend API docs can use the SDK immediately, though the mix of resource modules named as both classes and submodules (resend.Emails vs resend.emails) requires a moment to get used to.
Used by 6 apps in this directory
/dev/push
Developer Tools · Devops
Self-hosted, open-source Vercel alternative that deploys Python, Node.js, PHP, and any Docker-compatible app from a Git push, with zero-downtime rollouts and real-time logs.
Dify
No Code Platforms · AI Development · Developer Tools
Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.
Khoj
AI Assistants · Knowledge Management · Productivity
A self-hostable AI second brain that chats with your documents, searches the web, builds custom agents, and runs entirely on your own LLM.
LearnHouse
Learning Management · CMS
Open-source LMS with AI tutoring, real-time collaboration boards, live code execution, and built-in course monetization — self-hosted in minutes.
LiteLLM
AI Development · Developer Tools
Open source AI gateway and Python SDK that gives you one OpenAI-compatible interface to call 100+ LLM providers, with built-in routing, cost tracking, guardrails, and virtual keys.
OpenHands
AI Code Assistants · AI Development
The self-hosted developer control center for running AI coding agents — locally, in Docker, on VMs, or across cloud backends — with automation workflows for GitHub, Slack, and more.