Skip to main content

Lockally for Django

Official Django email backend for Lockally. Send transactional email through Django's standard mail API — send_mail, EmailMessage, EmailMultiAlternatives, and the admin — with no code changes.

Install

pip install lockally-django

Configure

# settings.py
EMAIL_BACKEND = "lockally_django.EmailBackend"
LOCKALLY_API_KEY = "lk_live_xxx"          # lk_test_xxx runs in sandbox (no real send)
# LOCKALLY_BASE_URL = "https://api.lockally.com"   # optional override

Use

from django.core.mail import EmailMultiAlternatives

msg = EmailMultiAlternatives(
    subject="Your OTP code",
    body="Your code is 847291.",
    from_email="alerts@yourdomain.com",
    to=["user@example.com"],
    reply_to=["support@yourdomain.com"],
)
msg.attach_alternative("<p>Your code is <b>847291</b>.</p>", "text/html")
msg.send()

Notes

  • Reply-To and any extra_headers are delivered via the message headers (Lockally has no separate reply_to field).
  • Attachments are sent as base64 (10 MB each). Inline/CID images are sent as regular attachments.
  • Each message carries a generated Idempotency-Key.
  • fail_silently=True is honored.

Built on the official lockally Python client.

License

MIT

Download files

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

Source Distribution

lockally_django-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

lockally_django-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file lockally_django-0.1.0.tar.gz.

File metadata

  • Download URL: lockally_django-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lockally_django-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d809fff34602168899dbb1d25b03a6272837c190881fe3bfd0166ec2a035f8de
MD5 cf5761e030804b0ea9cfbf5feb0c3cc3
BLAKE2b-256 0b1a70e4b8b491fb8600c118f7bf7deffa05e5de7f4cd6bf5c40068568601d99

See more details on using hashes here.

Provenance

The following attestation bundles were made for lockally_django-0.1.0.tar.gz:

Publisher: publish.yml on LockallyInc/lockally-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lockally_django-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lockally_django-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48b6f066ec66e6ba39ccc2098eae78ac498b03d7c24bb69801011d41333238fd
MD5 f68a9e333b369fecc1eda23a97049ea8
BLAKE2b-256 736d90c7e8e9dd6466bb1f5d4d8145885b52a9e1c73c3c7ee06c239accbfcf0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for lockally_django-0.1.0-py3-none-any.whl:

Publisher: publish.yml on LockallyInc/lockally-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page