Skip to main content

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


Download files

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

Source Distribution

python_axon_resend-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

python_axon_resend-1.0.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

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

Hashes for python_axon_resend-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1fa06bef87d796cd7e3abc3b2596906920d571ffd0f11b60a1beda72835dc81c
MD5 37d9eba40a9e2af5645c3d78093cc936
BLAKE2b-256 e64c31b29766e23d003aad0b805220f1c342b83ba8274f38198f2949c16bd108

See more details on using hashes here.

File details

Details for the file python_axon_resend-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_axon_resend-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5e2810e92127f8a0ab7a6eecc535198573246b5499a5d2c6ba5760742558f8e
MD5 93b4770dbb9b60e65710122948884f28
BLAKE2b-256 152ee6e4888e46237303dfbcd9b40033423a5fa3dfa28b294dbab68beb1de5ed

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