Resend.com mail driver vendor module for the Axon Framework
Project description
python-axon-resend
Resend.com transactional email driver for the Axon Framework.
Install
pip install python-axon-resend
Register
In your project's app/providers/providers.py:
from axon import VendorProvider
providers = [
VendorProvider.use("resend"),
]
Publish config stubs
./manage vendor:publish resend
This writes the required env vars into .env.example. Copy to .env and fill in:
RESEND__API_KEY=re_your_key_here
RESEND__FROM=MyApp <no-reply@yourdomain.com>
Usage
After registration, make(Mailer) anywhere in your app returns ResendMailer:
from axon import make
from axon.core.mail.mailer import Mailer
mailer = make(Mailer)
# Send immediately
mailer.send(
to="user@example.com",
subject="Welcome!",
body="<h1>Thanks for signing up.</h1>",
)
# Send in background (retries on failure)
mailer.queue(
to="user@example.com",
subject="Your weekly report",
body="<p>Here is your report...</p>",
delay=0,
)
Because it overrides the platform Mailer binding, every module that injects Mailer automatically uses Resend — no changes to existing module code.
All commands
./manage vendor:list # show all installed vendors
./manage vendor:publish resend # write env stubs to .env.example
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
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 python_axon_resend-1.0.0.tar.gz.
File metadata
- Download URL: python_axon_resend-1.0.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fa06bef87d796cd7e3abc3b2596906920d571ffd0f11b60a1beda72835dc81c
|
|
| MD5 |
37d9eba40a9e2af5645c3d78093cc936
|
|
| BLAKE2b-256 |
e64c31b29766e23d003aad0b805220f1c342b83ba8274f38198f2949c16bd108
|
File details
Details for the file python_axon_resend-1.0.0-py3-none-any.whl.
File metadata
- Download URL: python_axon_resend-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5e2810e92127f8a0ab7a6eecc535198573246b5499a5d2c6ba5760742558f8e
|
|
| MD5 |
93b4770dbb9b60e65710122948884f28
|
|
| BLAKE2b-256 |
152ee6e4888e46237303dfbcd9b40033423a5fa3dfa28b294dbab68beb1de5ed
|