Skip to main content

sealpost (Python)

Zero-dependency Python client for the self-hosted Sealpost email API. Python 3.8+, standard library only.

pip install sealpost
from sealpost import Sealpost, verify_webhook

mail = Sealpost(api_key="evk_...", base_url="https://mail.yourdomain.com")

result = mail.emails.send(
    "magic_link_otp_verification", "user@example.org",
    variables={"userName": "Ada", "otpCode": "482913", "signInUrl": "https://app.example.com/in"},
)
if result.error and result.error.code == "preflight_blocked":
    print(result.error.preflight["checks"])      # nothing was sent
elif result.ok:
    print(result.data["messageId"])

Results are Result(data, error) objects; nothing raises unless you call .unwrap().

aud = mail.audiences.create("Customers").unwrap()
mail.audiences.add_contacts(aud["id"], [{"email": "ada@example.org", "name": "Ada", "variables": {"userName": "Ada"}}])
mail.broadcasts.create("Launch", aud["id"], "workspace_team_invitation",
                       scheduled_at="2030-01-01T09:00:00Z", rate_per_minute=300)

mail.domains.check("news.example.org")           # live SPF / DKIM / DMARC lookup

Verifying webhooks

ok, reason = verify_webhook(SECRET, raw_body, request.headers["Sealpost-Signature"])

Pass the raw request body, before JSON parsing. Run the tests with PYTHONPATH=src python -m unittest discover tests. MIT.

Metadata

Release files for sealpost 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sealpost 0.1.0
File Size Uploaded Provenance
sealpost-0.1.0.tar.gz 10.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sealpost 0.1.0
File Interpreter ABI Platform
sealpost-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / sealpost-0.1.0.tar.gz

Download URL sealpost-0.1.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d2d6c55920216b84985c1c4255cfbcba0eb0fb9fc4da1f2861ba1d1ed2aaa4e9
BLAKE2b-256 checksum
How to use checksums
2c41c91b014f61dce7ce9bc51ba1cad7eddd71703a053d0afe31fb9849e4ef07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / sealpost-0.1.0-py3-none-any.whl

Download URL sealpost-0.1.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32f5e6e29603ff7e12a30009f85a145aaa2b1c408048b68544016144425d6797
BLAKE2b-256 checksum
How to use checksums
daf72bff513f23cbe2f7d88c06c739f9272b2e1e1701a78320871d5108e80c34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for sealpost 0.1.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page