Skip to main content

Official Python SDK for Resent transactional email

Project description

Send emails with Python — Resent

PyPI Python versions License Docs

Documentation · Website · PyPI · GitHub

Resent Python SDK

The official Python library for Resent transactional email.

Install

pip install resent

Setup

  1. Verify a sending domain in the Resent dashboard
  2. Create an API key under Settings → API keys
  3. Store it as RESENT_API_KEY
import os
from resent import Resent

resent = Resent(os.environ["RESENT_API_KEY"])

Usage

import os
from resent import Resent

resent = Resent(os.environ["RESENT_API_KEY"])

result = resent.emails.send(
    from_="Acme <noreply@yourdomain.com>",
    to="you@example.com",
    subject="Hello World",
    html="<p>Congrats on sending your <strong>first email</strong> with Resent!</p>",
)

print(result.submission_id)

Send email using HTML

result = resent.emails.send(
    from_="Acme <noreply@yourdomain.com>",
    to=["you@example.com"],
    subject="Hello World",
    html="<strong>It works!</strong>",
)

Send email using text

result = resent.emails.send(
    from_="Acme <noreply@yourdomain.com>",
    to="you@example.com",
    subject="Hello World",
    text="It works!",
)

Docs

License

MIT © Resent

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resent-0.1.0.tar.gz (102.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resent-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file resent-0.1.0.tar.gz.

File metadata

  • Download URL: resent-0.1.0.tar.gz
  • Upload date:
  • Size: 102.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for resent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 17647f81fdb11fdd07060133b847c08cb32103d6c52c03eadb053623a48767c3
MD5 e4ac36f4caf249e142bc9c5442d4ea24
BLAKE2b-256 3d8fd37a11ad5a3a72c99a13617441186e2d9cbbec617b13e43eaf02c266bdf2

See more details on using hashes here.

File details

Details for the file resent-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: resent-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for resent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1582189eedc84b424afcb9a011c926b034c8610e2957e8d50eee09e22108f40
MD5 04caeb1702829b9ec2c1d2548734650a
BLAKE2b-256 070e3d5f5be151816da47d5b9dde6d359a1423b6a2b3d069ac9d103dfc2f7c9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page