Official Python SDK for Resent transactional email
Project description
Documentation · Website · PyPI · GitHub
Resent Python SDK
The official Python library for Resent transactional email.
Install
pip install resent
Setup
- Verify a sending domain in the Resent dashboard
- Create an API key under Settings → API keys
- 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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17647f81fdb11fdd07060133b847c08cb32103d6c52c03eadb053623a48767c3
|
|
| MD5 |
e4ac36f4caf249e142bc9c5442d4ea24
|
|
| BLAKE2b-256 |
3d8fd37a11ad5a3a72c99a13617441186e2d9cbbec617b13e43eaf02c266bdf2
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1582189eedc84b424afcb9a011c926b034c8610e2957e8d50eee09e22108f40
|
|
| MD5 |
04caeb1702829b9ec2c1d2548734650a
|
|
| BLAKE2b-256 |
070e3d5f5be151816da47d5b9dde6d359a1423b6a2b3d069ac9d103dfc2f7c9e
|