señora
Python client library for DaMe — the Datennetz der Medizin S/MIME-based messaging network used by Austrian healthcare providers (operated by Telekom Austria / VTG, historically Gesundheitsnetz Vorarlberg).
This library replaces the legacy Java DaMe.jar client with a pure-Python
implementation that can be embedded in e.g. Django or used standalone.
What this library does
- Fetch S/MIME-encrypted mails from a DaMe POP3 mailbox, verify signatures, decrypt content, and expose attachments as plain bytes.
- Sign and encrypt outgoing documents with your PKCS#12 identity, look up
recipient certificates in the
esignature.telekom.atLDAP directory, and submit them via the DaMe SMTP relay. - Generate and process S/MIME Message Disposition Notifications (MDN, RFC 8098).
- Apply the DaMe filename policy (prefix-based sequence numbers).
What it deliberately does not do
- EDIFACT parsing — use pydifact and
pydifact-aekfor Austrian laboratory findings. - DICOM send/receive — a separate tier, use pynetdicom.
- GUI — this is a library.
Install
uv pip install senora
For local development:
uv venv
uv pip install -e '.[test]'
uv run pytest
Quick start
from pathlib import Path
from senora import Client, Identity, PeerLookup
identity = Identity.from_pkcs12(
Path("certs/mykey.p12").read_bytes(),
password="MEXXXXXX",
)
client = Client(
identity=identity,
pop3_host="mail.dame.at",
pop3_port=995, # POP3S (implicit TLS); default
pop3_tls="ssl", # default
pop3_user="mexxxxxx@dame.at",
pop3_password="...",
smtp_host="dsmtp.dame.at",
smtp_port=587,
smtp_user="mexxxxxx@dame.at",
smtp_password="...",
peer_lookup=PeerLookup(server="ldap://esignature.telekom.at"),
)
# Receive
for msg in client.fetch(delete=False):
for att in msg.attachments:
Path("inbox", att.filename).write_bytes(att.content)
# Send
client.send(
recipient_hv="ME654321",
attachments=[("befund.edi", edi_bytes, "application/edifact")],
cipher="AES",
sign=True,
request_mdn=True,
)
Security model
- Private keys: loaded from PKCS#12 into memory only; never written to disk. Store P12 passphrases in an OS keyring, Vault, systemd-credentials, or an equivalent secret manager — never in source or config files.
- TLS: POP3 fetch uses implicit TLS on port 995 by default
(
mail.dame.at:995, TLS 1.3, valid cert). SMTP submission uses STARTTLS on port 587. Legacy deployments without POP3S can opt back into plain port 110 by passingpop3_port=110, pop3_tls="none"— a cleartext warning will be logged on every connect. - CRL checking: optional, enabled via
PeerLookup(check_crl=True). - Padding: S/MIME content encryption uses PKCS#7 padding; RSA key transport uses PKCS#1 v1.5 for compatibility with legacy DaMe peers.
Status
Alpha. Core primitives (S/MIME sign/verify/encrypt/decrypt, PKCS#12 loading,
POP3/SMTP transport, LDAP peer lookup, filename policy) are implemented and
unit-tested. Interop tests against the live mail.dame.at service are pending
(see docs/TODO.md).
Metadata
Release files for senora 0.4.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 | |
|---|---|---|---|---|
| senora-0.4.0.tar.gz | 133.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| senora-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 194.2 kB
Release files / senora-0.4.0.tar.gz
| Download URL | senora-0.4.0.tar.gz |
|---|---|
| Size | 133.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83df5663c8d32f29ca5f641e9722621b6ea44da5c74bdeaae33997d076ba2ee3
|
|
BLAKE2b-256 checksum How to use checksums |
c2f224c472bf829156b97ffdadf3e50d0b3ab8d626424d10147d2e833446caf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / senora-0.4.0-py3-none-any.whl
| Download URL | senora-0.4.0-py3-none-any.whl |
|---|---|
| Size | 61.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f45567ba444f053a4bded7a29961b749b5a66a9eaed3204d594c3ad9df323f9f
|
|
BLAKE2b-256 checksum How to use checksums |
48f903fd738fea01e5cb8c32df2b4cfbad20842e80cde8d48fb6a14a653e1a4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for senora 0.4.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.