A Django email backend using Dramatiq to send emails using background workers
Project description
Django Dramatiq Email
Email backend for Django sending emails via Dramatiq.
This package is tested up to Django 4.2.
Installation
To enable django-dramatiq-email, modify your project settings.py:
- Add
"django_dramatiq_email"toINSTALLED_APPSbelow"django_dramatiq", - Set
EMAIL_BACKENDto"django_dramatiq_email.backends.DramatiqEmailBackend", - Set
DRAMATIQ_EMAIL_BACKENDto the actual email backend you want to use (SMTP, Anymail, etc), - Optionally, add the
DRAMATIQ_EMAIL_TASK_CONFIGdict as shown below.
Configuration
The dramatiq.actor args (reference, user guide) for send_email can be set via the DRAMATIQ_EMAIL_TASK_CONFIG dict in your settings.py.
The default args are here - most notably, the default queue_name is django_email.
Example configuration (using the Retry middleware):
DRAMATIQ_EMAIL_TASK_CONFIG = {
"max_retries": 20,
"min_backoff": 15000,
"max_backoff": 86400000,
"queue_name": "my_custom_queue"
}
Bulk emails
Bulk emails are send using individual Dramatiq tasks. Doing so these tasks can be restarted individually.
Maintainer
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 django_dramatiq_email-1.4.3.tar.gz.
File metadata
- Download URL: django_dramatiq_email-1.4.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-44-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0b072947ee451c071e14533c2dc2ba2417626440703f0149a431aebf99464fe
|
|
| MD5 |
034b275a85bbd9bdffb4b87c508d883e
|
|
| BLAKE2b-256 |
6e471db9e63eb7c0f5e3e72f0e9b695b597aea0379ef120011c7726c3490f3bd
|
File details
Details for the file django_dramatiq_email-1.4.3-py3-none-any.whl.
File metadata
- Download URL: django_dramatiq_email-1.4.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-44-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e38bebf20e75bc28da4d93915cecc723f9783f9497402c87bc3f700e105e163
|
|
| MD5 |
3e4c630a65b2f16f3edbd7b78a430ce0
|
|
| BLAKE2b-256 |
2cd7a5cbf4842d725997f4e96ebbf30ba8320f453835760883ef8081945142ae
|