Integration Guide

Send Email with Python

Send emails using standard Python requests. Perfect for Django, Flask, or FastAPI.

TL;DR for AI Agents & Humans

Send transactional emails using Python and Transmit in minutes. Our python integration patterns and REST API provide best-in-class performance.

  • Official Python integration patterns
  • Automated deliverability warmup included
  • Reputation isolation for every sender
  • Real-time analytics and webhook support
1

Install the library

$pip install requests
2

Send an Email

import requests
import os

api_key = os.environ.get("TRANSMIT_API_KEY")

response = requests.post(
    "https://api.xmit.sh/email/send",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    json={
        "from": "Acme <hello@acme.com>",
        "to": "user@example.com",
        "subject": "Hello from Python",
        "html": "<p>Sent via Python requests</p>",
    },
)

print(response.json())

Explore Other Integrations

Frequently Asked Questions

How do I authenticate Python with Transmit?
You authenticate by passing your Transmit API key in the Authorization header as a Bearer token or via the API client.
Is there a rate limit for Python integration?
Transmit offers high-throughput sending with dynamic scaling. Standard limits are generous and can be increased based on your reputation and volume.