[Python SDK]
Django
Send password resets, receipts, and notifications from Django views and Celery tasks.
Step 1
Install the package
Add the official Python client to your Django project.
bash
pip install reloop-emailStep 2
Set your API key
Create a free Reloop account, copy your API key, and add it to your Django environment.
Get an API key free →bash
RELOOP_API_KEY="re_xxxxxxxx"Step 3
Send email from Django
Use this Django snippet to send your first message. Works with Views · Celery · Admin.
send_email.py
1import os2from django.http import JsonResponse3from reloop_email import Reloop4
5reloop = Reloop(api_key=os.environ["RELOOP_API_KEY"])6
7def send_welcome(request):8 result = reloop.mail.send({9 "from": "Acme <onboarding@yourdomain.com>",10 "to": [request.POST["email"]],11 "subject": "Welcome",12 "html": "<strong>Thanks for signing up.</strong>",13 })14
15 if result.email_error:16 return JsonResponse({"error": str(result.email_error)}, status=500)17
18 return JsonResponse({"id": result.response["id"]})Next steps
Examples, docs, and API reference
Go deeper with working code and the full API for Python.
Other frameworks
Same API, framework-specific examples.
Send with Django.
Get an API key and ship transactional email from Django using the official Python SDK.