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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d809fff34602168899dbb1d25b03a6272837c190881fe3bfd0166ec2a035f8de
|
|
| MD5 |
cf5761e030804b0ea9cfbf5feb0c3cc3
|
|
| BLAKE2b-256 |
0b1a70e4b8b491fb8600c118f7bf7deffa05e5de7f4cd6bf5c40068568601d99
|
Provenance
The following attestation bundles were made for lockally_django-0.1.0.tar.gz:
Publisher:
publish.yml on LockallyInc/lockally-django
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lockally_django-0.1.0.tar.gz -
Subject digest:
d809fff34602168899dbb1d25b03a6272837c190881fe3bfd0166ec2a035f8de - Sigstore transparency entry: 2342989982
- Sigstore integration time:
-
Permalink:
LockallyInc/lockally-django@81d43871043377c9b40543b18ba9e5e0c736a6c8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LockallyInc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81d43871043377c9b40543b18ba9e5e0c736a6c8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lockally_django-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lockally_django-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48b6f066ec66e6ba39ccc2098eae78ac498b03d7c24bb69801011d41333238fd
|
|
| MD5 |
f68a9e333b369fecc1eda23a97049ea8
|
|
| BLAKE2b-256 |
736d90c7e8e9dd6466bb1f5d4d8145885b52a9e1c73c3c7ee06c239accbfcf0c
|
Provenance
The following attestation bundles were made for lockally_django-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on LockallyInc/lockally-django
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lockally_django-0.1.0-py3-none-any.whl -
Subject digest:
48b6f066ec66e6ba39ccc2098eae78ac498b03d7c24bb69801011d41333238fd - Sigstore transparency entry: 2342990029
- Sigstore integration time:
-
Permalink:
LockallyInc/lockally-django@81d43871043377c9b40543b18ba9e5e0c736a6c8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LockallyInc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81d43871043377c9b40543b18ba9e5e0c736a6c8 -
Trigger Event:
push
-
Statement type: