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_headersare delivered via the message headers (Lockally has no separatereply_tofield). - 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=Trueis honored.
Built on the official lockally Python client.
License
MIT
Metadata
Release files for lockally-django 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| lockally_django-0.1.0.tar.gz | 5.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lockally_django-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / lockally_django-0.1.0.tar.gz
| Download URL | lockally_django-0.1.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d809fff34602168899dbb1d25b03a6272837c190881fe3bfd0166ec2a035f8de
|
|
BLAKE2b-256 checksum How to use checksums |
0b1a70e4b8b491fb8600c118f7bf7deffa05e5de7f4cd6bf5c40068568601d99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logRelease files / lockally_django-0.1.0-py3-none-any.whl
| Download URL | lockally_django-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48b6f066ec66e6ba39ccc2098eae78ac498b03d7c24bb69801011d41333238fd
|
|
BLAKE2b-256 checksum How to use checksums |
736d90c7e8e9dd6466bb1f5d4d8145885b52a9e1c73c3c7ee06c239accbfcf0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logSecurity for lockally-django 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for lockally_django-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.