Library for generating and scheduling Email
It allows to send emails using SendGrid or Microsoft Graph.
It also contains certain utils to generate Attachments, eg using Power BI
It does store logs about sent mails in Azure Table Storage to avoid duplicate mails.
from bmsdna.mailing.attachments.static_attachment import StaticAttachment
from bmsdna.mailing.registry import GenerationInfo, daily_mail, TZONE
from datetime import datetime
from bmsdna.mailing import MailMessage
from typing import List
from datetime import time
import polars as pl
from mail_utils import get_unique_id_from_values
@daily_mail(
"tester",
"test_mail",
day_time=time(6, 0, tzinfo=TZONE),
start_date=datetime(2025, 3, 16, 6, 0, tzinfo=TZONE),
retry_on_empty_send=False,
)
async def generate_mail(info: GenerationInfo) -> List[MailMessage]:
return [
MailMessage(
entity=info.mail_name,
subject="Test Mail",
body="Test Mail",
to="some_email@other.ch",
sender="thisisasender@thing.ch",
attachments=[StaticAttachment(b"Hello World", "test.txt")],
system=info.system,
entity_id=get_unique_id_from_values( # if this one is already sent in sendgrid, won't be sent again
{
"mail_name": info.mail_name,
"system": info.system,
"date": datetime.now().strftime("%Y-%m-%d"),
}
),
body_is_html=False,
)
]
Metadata
Release files for bmsdna-mailing 0.9.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 |
|---|---|---|---|---|
| bmsdna_mailing-0.9.0.tar.gz | 108.1 kB | With provenance | Details for bmsdna_mailing-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bmsdna_mailing-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for bmsdna_mailing-0.9.0-py3-none-any.whl |
Total release size: 135.7 kB
Release files / bmsdna_mailing-0.9.0.tar.gz
| Download URL | bmsdna_mailing-0.9.0.tar.gz |
|---|---|
| Size | 108.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f776c96900ef2d14dec1cf21f106f69d7a7e5724fb02db42f5e6858bb24142f6
|
|
BLAKE2b-256 checksum How to use checksums |
978f177940344434085c75ed7197796d1f97e6f23eddbb39cbc66ee9cc030cfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 24, 2026.
Transparency logRelease files / bmsdna_mailing-0.9.0-py3-none-any.whl
| Download URL | bmsdna_mailing-0.9.0-py3-none-any.whl |
|---|---|
| Size | 27.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dda2aa23075e8f05a1b6c5cfd2ef1cd23a1785549926e4cb3d84c017ce114164
|
|
BLAKE2b-256 checksum How to use checksums |
6fc7dfe662e8056a8b20ec4206b6959a02f8260612fa799cd6952bb88cc0ab2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 24, 2026.
Transparency logSecurity for bmsdna-mailing 0.9.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 bmsdna_mailing-0.9.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 Apr 24, 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.