Django + Brevo for transactional emails and customer journey automations.
Project description
Django + Brevo for transactional emails and customer journey automations."
Installation
pip install dj-brevo
Quick Start
1. Add to your INSTALLED_APPS:
INSTALLED_APPS = [
...
"dj_brevo",
]
2. Configure your Brevo API key:
DJ_BREVO = {
"API_KEY": "your-brevo-api-key",
"DEFAULT_FROM_EMAIL": "noreply@yourdomain.com",
}
3. Set the email backend:
EMAIL_BACKEND = "dj_brevo.backends.BrevoEmailBackend"
4. Send emails using Django's standard email functions:
from django.core.mail import send_mail
send_mail(
subject="Welcome!",
message="Thanks for signing up.",
from_email="hello@yourdomain.com",
recipient_list=["user@example.com"],
)
Using Brevo Templates
To send emails using templates created in Brevo's dashboard:
from dj_brevo.services import BrevoClient
client = BrevoClient()
client.send_template_email(
to=[{"email": "user@example.com", "name": "David"}],
template_id=12,
params={"firstName": "David", "orderTotal": "$50"},
)
Configuration
All settings are optional except API_KEY:
DJ_BREVO = {
# Required
"API_KEY": "your-brevo-api-key",
# Optional
"DEFAULT_FROM_EMAIL": "noreply@yourdomain.com",
"TIMEOUT": 10, # Request timeout in seconds
"API_BASE_URL": "https://api.brevo.com/v3", # Override for testing
}
Requirements
- Python 3.12+
- Django 5.0+
License
MIT
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 dj_brevo-0.1.0.tar.gz.
File metadata
- Download URL: dj_brevo-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70712cf70559923d1ae41a66fcc0acacb6cbc98e7e2ade44a29063b8639cba56
|
|
| MD5 |
bcca4358dd03fcfc8a4c389ede8b95b5
|
|
| BLAKE2b-256 |
f2da504191f8868875ea81801f82bbf6d6d7328088fa76f996ee270821f44717
|
Provenance
The following attestation bundles were made for dj_brevo-0.1.0.tar.gz:
Publisher:
publish.yml on dmckim1977/dj-brevo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dj_brevo-0.1.0.tar.gz -
Subject digest:
70712cf70559923d1ae41a66fcc0acacb6cbc98e7e2ade44a29063b8639cba56 - Sigstore transparency entry: 832056421
- Sigstore integration time:
-
Permalink:
dmckim1977/dj-brevo@3c8ee71a3a8be650891cd580822f46829e2aa7c0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dmckim1977
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3c8ee71a3a8be650891cd580822f46829e2aa7c0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dj_brevo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dj_brevo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2021b4c29d13f41e7a80c160b076639f1a917cd7d266db6d90e7535884a5c740
|
|
| MD5 |
544113e8ea1c0bb22dcce4928fe6f0a3
|
|
| BLAKE2b-256 |
9b77d950d285503f8817e4f47207b7c5e97c92ce1b8d749e147fedac9b2f5dfe
|
Provenance
The following attestation bundles were made for dj_brevo-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on dmckim1977/dj-brevo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dj_brevo-0.1.0-py3-none-any.whl -
Subject digest:
2021b4c29d13f41e7a80c160b076639f1a917cd7d266db6d90e7535884a5c740 - Sigstore transparency entry: 832056424
- Sigstore integration time:
-
Permalink:
dmckim1977/dj-brevo@3c8ee71a3a8be650891cd580822f46829e2aa7c0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dmckim1977
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3c8ee71a3a8be650891cd580822f46829e2aa7c0 -
Trigger Event:
release
-
Statement type: