Framework Integration

Python + Unosend

Send emails from Python with our official SDK. Perfect for Django, Flask, FastAPI, and any Python application.

Features

Everything you need to send emails from Python

Async and sync APIs

Type hints for IDE support

Django/Flask integrations

Automatic rate limiting

Comprehensive error handling

Quick Start

Get up and running in minutes with this code example

Code Example
from unosend import Unosend
import os

unosend = Unosend(api_key=os.environ.get("UNOSEND_API_KEY"))

# Send a simple email
response = unosend.emails.send(
    from_email="hello@yourdomain.com",
    to="user@example.com",
    subject="Hello from Python",
    html="<p>Hello World!</p>"
)

# Async usage
import asyncio
from unosend import AsyncUnosend

async def send_email():
    async_unosend = AsyncUnosend(api_key=os.environ.get("UNOSEND_API_KEY"))
    response = await async_unosend.emails.send(
        from_email="hello@yourdomain.com",
        to="user@example.com",
        subject="Async Email",
        html="<p>Sent asynchronously!</p>"
    )
    return response

asyncio.run(send_email())

Setup Guide

Follow these steps to integrate Unosend with Python

1

Install the SDK: pip install unosend

2

Set UNOSEND_API_KEY environment variable

3

Import Unosend client

4

Call emails.send() with your email data

Why Use Unosend with Python?

Native Python idioms

Async/await support for high performance

Works with any Python web framework

Type hints for better IDE experience

Ready to integrate?

Start sending emails from Python in under 5 minutes. Free tier includes 5,000 emails/month.