Skip to main content

Template-first transactional email SDK for EmailsDone.

Project description

EmailsDone for Python

EmailsDone.dev — Production-ready app email for developers who do not want an email project.

Add password resets, verification, notifications and billing emails without building templates, writing HTML or wiring email infrastructure.

Emails. Done.

Install

pip install emailsdone

The SDK uses requests at runtime. Installing emailsdone pulls that in automatically, but if you are running the generated source from this repository directly you should install it yourself:

pip install requests

Run the example

To run the interactive console example from this repository:

cd libraries/python
python3 Examples/main.py

The published package files live in libraries/python/EmailsDone.

The example uses the generated local SDK, prompts for your API key, validates it with get_quota(), and then lets you send templates or check recipient status from a menu.

API key

Store your EmailsDone API key in server-side configuration. Environment variables are the simplest starting point:

EMAILSDONE_API_KEY=your_api_key_here

Do not put this key in browser JavaScript, mobile apps, public frontend configuration, source control, or client-side logs.

Send an email

import os
from emailsdone import EmailsDone

emails_done = EmailsDone.from_api_key(os.environ["EMAILSDONE_API_KEY"])

emails_done.authentication.welcome(
    "user@example.com",
    "https://app.example.com/action"
)

Required template fields stay as direct Python parameters:

emails_done.authentication.password_reset(
    "user@example.com",
    "https://app.example.com/action"
)

Optional fields and send controls

Optional template fields are keyword-only parameters. For example: action_button_label, call_to_action_heading, call_to_action_paragraph, heading, intro, preheader, subject.

Every generated send method also supports the same keyword-only send controls:

  • template_version
  • from_email
  • from_name
  • reply_to
  • idempotency_key
  • timeout

Recipient status

recipient = emails_done.recipient("user@example.com")
status = recipient.get_status()

if status.recipient.get("subscription", {}).get("status") != "subscribed":
    recipient.resubscribe()

Quota

quota = emails_done.get_quota()

Idempotency

Use an idempotency key for password resets, billing emails, and other flows where your app or worker may retry the same send.

emails_done.authentication.password_reset(
    "user@example.com",
    reset_url,
    idempotency_key=f"password-reset-{user_id}-{token_id}",
)

Template groups

The generated client mirrors EmailsDone template categories and recipient resource actions:

  • emails_done.get_quota()
  • emails_done.recipient(email).get_status()
  • emails_done.recipient(email).resubscribe()
  • emails_done.authentication
  • emails_done.billing
  • emails_done.developer
  • emails_done.notifications
  • emails_done.team

Each method sends a named EmailsDone template through /v1/send.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emailsdone-0.1.10.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

emailsdone-0.1.10-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file emailsdone-0.1.10.tar.gz.

File metadata

  • Download URL: emailsdone-0.1.10.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for emailsdone-0.1.10.tar.gz
Algorithm Hash digest
SHA256 77eb010d2b435b15a0a690f3013ddf474664a69b43227121b4c2af807fe67cef
MD5 3721148c5b2893af75af38d5685e57aa
BLAKE2b-256 b959aa252fc5e991475dccd7e655b28025b5a46e77e01ab9c8ae0d9ff5c72b57

See more details on using hashes here.

File details

Details for the file emailsdone-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: emailsdone-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for emailsdone-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 36da7ecf61c2736eb3c8a1a7d3e21d58fceb974edc1a8106910c1471d95e3ba7
MD5 3c0737a907f1a2e69e100360d2b9500a
BLAKE2b-256 75e5bfbcc33f5e50d92b81c17ae97f7adfa7fafd4994254d1385f242a9dc36c2

See more details on using hashes here.

Supported by

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