nyxa-mail — batteries-included mail for Nyxa
Log/file mailer by default (no SMTP required). Optional SMTP, SES, and Mailgun.
At a glance
| What you need | Nyxa Mail |
|---|---|
| Reusable message class | nyxa_mail.Mailable |
| Send a message | mail.send(mailable) |
| Local dev without SMTP | MAIL_MAILER=log (writes storage/logs/mail/) |
| SMTP delivery | MAIL_MAILER=smtp + MAIL_HOST / MAIL_PORT / … |
| SES / Mailgun | MAIL_MAILER=ses / mailgun + extras |
Install
uv add nyxa-mail
uv add 'nyxa-mail[ses]' # boto3
uv add 'nyxa-mail[mailgun]' # httpx
Quick start
from nyxa_mail import Mailable, mail
class WelcomeMail(Mailable):
def __init__(self, name: str) -> None:
super().__init__()
self.name = name
def text(self) -> str:
return f"Welcome, {self.name}!\n"
mail.send(WelcomeMail("Ada").to("ada@example.com").subject("Welcome"))
Configuration
MAIL_MAILER=log
MAIL_FROM=app@example.com
# MAIL_MAILER=smtp
# MAIL_HOST=... MAIL_PORT=587 MAIL_USERNAME=... MAIL_PASSWORD=...
# MAIL_MAILER=ses
# AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... AWS_DEFAULT_REGION=us-east-1
# MAIL_MAILER=mailgun
# MAILGUN_DOMAIN=mg.example.com
# MAILGUN_API_KEY=key-...
# MAILGUN_API_BASE=https://api.eu.mailgun.net # optional (EU)
CLI
uv run nyxa mail test --to you@example.com
Metadata
Release files for nyxa-mail 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 | |
|---|---|---|---|
| nyxa_mail-0.1.0.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nyxa_mail-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / nyxa_mail-0.1.0.tar.gz
| Download URL | nyxa_mail-0.1.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50b0f5678d3fc8511fa768f407331ed34ef08cc235957000de2982a4b2e79115
|
|
BLAKE2b-256 checksum How to use checksums |
8e825e50012ef59fc893e5a82a87b0b1b4692af142a1cca983c60e3844403fd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / nyxa_mail-0.1.0-py3-none-any.whl
| Download URL | nyxa_mail-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93e3e67ac7d6112eab96181f0cc8432c418de081b85da017d202a450a2bd3a67
|
|
BLAKE2b-256 checksum How to use checksums |
e9edab670785f3753fc3f7a7415fd5423a8cc0d2ed58e377b4ea16ec6aabf4a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|