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.1.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.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file python_axon_resend-1.0.1.tar.gz.

File metadata

  • Download URL: python_axon_resend-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 b268743d3be9e61816dbdc96c52409b01d9ffc21a8894d56d04b9bd9e446d4b1
MD5 c86ffa51a52c83e17504f0eb36e21764
BLAKE2b-256 873512accbf596cbc7c0f5c36f4ca6aecb31680e3307fd2eb661f3a09b3578fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_axon_resend-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bfbab18c04d63e747ba18406518fc75092e0f7ac1e534fd8a36152d9102d009a
MD5 624a93868d276d07cbca2071c5622728
BLAKE2b-256 523f0d4856c9ea1417b2f7bd7b13057f1e265c337aa41e8505a234a396cd80f8

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