Skip to main content

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 EmailMessage builder 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 EmailTransport Protocol — 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

penguin_email-0.1.0.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

penguin_email-0.1.0-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

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

Hashes for penguin_email-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d0cb63996f91b1d56b0a5d27c43c8c51087265ea9f494564ff084d45b8bc39c0
MD5 a1c3813002d3f7511dfc2b250572489b
BLAKE2b-256 ccafc49b3b6462b54271628f6e90051b70f73b988d1d7154999f573a36aa0fec

See more details on using hashes here.

Provenance

The following attestation bundles were made for penguin_email-0.1.0.tar.gz:

Publisher: publish.yml on penguintechinc/penguin-libs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for penguin_email-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f2743248d84bae39e745cbdea29c61282a654f870999ab2ae053cd22a9e2270
MD5 340ed0e6f08486844f6269890131b09d
BLAKE2b-256 db8991847f49f31ff04697f393b80c4584aff0e83e5a57992457c3697f77716d

See more details on using hashes here.

Provenance

The following attestation bundles were made for penguin_email-0.1.0-py3-none-any.whl:

Publisher: publish.yml on penguintechinc/penguin-libs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page