penguin-email
Pluggable email sending library for Penguin Tech applications.
Features
- Gmail REST API transport (OAuth2, primary)
- SMTP transport (SSL / STARTTLS / PLAIN with
InsecureConnectionWarning) - Fluent
EmailMessagebuilder with Jinja2 templating - Built-in templates: welcome, notification, transactional, alert, password_reset, form
- Form builder and table builder helpers
- Full attachment support (files, bytes, inline images)
- Formal
EmailTransportProtocol — add new transports with zero core changes
Installation
pip install penguin-email # SMTP + templates only
pip install "penguin-email[gmail]" # adds Gmail REST API support
Quick Start
from penguin_email import EmailClient, EmailMessage, SmtpTransport, SmtpMode
transport = SmtpTransport(host="smtp.example.com", mode=SmtpMode.STARTTLS,
username="user", password="pass")
client = EmailClient(transport)
result = client.send(
EmailMessage()
.from_addr("sender@example.com")
.to("recipient@example.com")
.subject("Hello!")
.template("welcome", name="Alice", app_name="MyApp", login_url="https://app.example.com/login")
)
print(result.success, result.message_id)
Gmail Transport
from penguin_email import EmailClient, EmailMessage, GmailTransport
transport = GmailTransport.from_env() # reads GMAIL_* env vars
client = EmailClient(transport)
License
AGPL-3.0 — see LICENSE.md
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 penguin_email-0.1.0.tar.gz.
File metadata
- Download URL: penguin_email-0.1.0.tar.gz
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0cb63996f91b1d56b0a5d27c43c8c51087265ea9f494564ff084d45b8bc39c0
|
|
| MD5 |
a1c3813002d3f7511dfc2b250572489b
|
|
| BLAKE2b-256 |
ccafc49b3b6462b54271628f6e90051b70f73b988d1d7154999f573a36aa0fec
|
Provenance
The following attestation bundles were made for penguin_email-0.1.0.tar.gz:
Publisher:
publish.yml on penguintechinc/penguin-libs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
penguin_email-0.1.0.tar.gz -
Subject digest:
d0cb63996f91b1d56b0a5d27c43c8c51087265ea9f494564ff084d45b8bc39c0 - Sigstore transparency entry: 2555160600
- Sigstore integration time:
-
Permalink:
penguintechinc/penguin-libs@029f921b551a01e23ff83504c7b8719002d50a09 -
Branch / Tag:
refs/tags/penguin-email-v0.1.0 - Owner: https://github.com/penguintechinc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@029f921b551a01e23ff83504c7b8719002d50a09 -
Trigger Event:
push
-
Statement type:
File details
Details for the file penguin_email-0.1.0-py3-none-any.whl.
File metadata
- Download URL: penguin_email-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.4 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 |
4f2743248d84bae39e745cbdea29c61282a654f870999ab2ae053cd22a9e2270
|
|
| MD5 |
340ed0e6f08486844f6269890131b09d
|
|
| BLAKE2b-256 |
db8991847f49f31ff04697f393b80c4584aff0e83e5a57992457c3697f77716d
|
Provenance
The following attestation bundles were made for penguin_email-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on penguintechinc/penguin-libs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
penguin_email-0.1.0-py3-none-any.whl -
Subject digest:
4f2743248d84bae39e745cbdea29c61282a654f870999ab2ae053cd22a9e2270 - Sigstore transparency entry: 2555160616
- Sigstore integration time:
-
Permalink:
penguintechinc/penguin-libs@029f921b551a01e23ff83504c7b8719002d50a09 -
Branch / Tag:
refs/tags/penguin-email-v0.1.0 - Owner: https://github.com/penguintechinc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@029f921b551a01e23ff83504c7b8719002d50a09 -
Trigger Event:
push
-
Statement type: