Just sends emails. Simple, easy, multiformat.
For those wondering, Ogmios is just the Gallic god of eloquence.
Quickstart
Install from PyPI with pip: pip install django-ogmios.
yourproject/templates/mail/template.html:
from: admin@example.org
to: Jane Doe <jane.doe@example.net>, {% for u in users %}{{ user.email }}, {% endfor %}
cc: John Doe <john.doe@example.org>, {{ copy_user.get_full_name }} <{{ copy_user.email }}>
bcc: anonymous@example.org, secret@example.com
subject: The whole email is a template
content-type: markdown
headers:
Reply-To: Jaqueline <jaqueline@example.net>
Organization: Example.org, Inc.
---
{% load special_filter %}
This is a list of special items:
{% for item in item_list %}
* {{ item|special }}
{% endfor %}
import ogmios
ogmios.send_email('mail/template.html',
{'item_list': ['Hello']},
attachments=[{
'path': '/path/to/file/',
'name': 'file.txt',
'type': 'text/plain',
}])
This will render the content as markdown, and send the email with an HTML part and a Plaintext part. For attachments, it is possible to just specify the path, or the path, filename and mimetype.
Tips
Resend an email with different context:
import functools
import ogmios
from myapp.models import User
send_registration = functools.partial(ogmios.send, 'mail/template.html')
send_registration({'user': User.objects.get(pk=1337)})
Changelog
0.12.0 (2025-01-29)
Use old non-strict behavior of getaddresses. Requires latest patch version of Python >= 3.8
0.11.2 (2020-07-02)
Make bcc work
0.11.1 (2018-10-12)
Fix email parsing [#15]
0.11.0 (2018-09-04)
Add support for Django > 1.11 and remove support for all prior versions.
0.10.0 (2016-04-13)
Add support for Django 1.9
Drop support for Django 1.7
Move method of adding attachments out of the template and require attachments to be passed as an argument to send_email().
0.9.3 (2015-08-27)
Add Django 1.7 compatibility.
0.9.2 (2015-07-16)
Fix setup.py dependencies.
Fix tests.
Fix compatibility with django’s cached loader.
Fix context processing.
0.9.1 (2015-06-22)
Fix ‘From’ field always being default
0.9.0 (2015-06-18)
Initial version
Metadata
Release files for django-ogmios 0.12.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 | Actions |
|---|---|---|---|---|
| django_ogmios-0.12.0.tar.gz | 5.9 kB | Without provenance | Details for django_ogmios-0.12.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_ogmios-0.12.0-py3-none-any.whl | Python 3 | none | any | Details for django_ogmios-0.12.0-py3-none-any.whl |
Total release size: 11.8 kB
Release files / django_ogmios-0.12.0.tar.gz
| Download URL | django_ogmios-0.12.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02c0dc4a78d62ed6146486e6aafe158d88666d9420a1b71894ef4570f820715d
|
|
BLAKE2b-256 checksum How to use checksums |
57ce712652bc17ac0567fce6070e2ffcb9d7eb9db6632eeae961f99f34d95950
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / django_ogmios-0.12.0-py3-none-any.whl
| Download URL | django_ogmios-0.12.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70cd540c314ecfb9d126eb1afadcbf27b0cf0f1703ffa1be88aa13b900a992ce
|
|
BLAKE2b-256 checksum How to use checksums |
2c2fb0ff205fa8b6123d9299a0c07b556fb52f13213f5c0810685665c7fe41c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for django-ogmios 0.12.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.