Skip to main content

Official MailKite SDK for Python — send and manage email over your own authenticated domain.

Project description

MailKite for Python

Official MailKite SDK. One low-level request() plus one method per endpoint. Zero dependencies — standard library only. Python 3.7+.

Install

pip install mailkite-dev

Published as mailkite-dev for now (the mailkite name is being reclaimed). The import is unchanged — from mailkite import MailKite.

Usage

import os
from mailkite import MailKite

mk = MailKite(os.environ["MAILKITE_API_KEY"])

res = mk.send({
    "from": "hello@myapp.ai",
    "to": "ada@example.com",
    "subject": "Your invoice #1042",
    "html": "<p>Thanks! Receipt attached.</p>",
})

Point at a different base URL with MailKite(key, "https://api.mailkite.dev").

Methods

send(message), agent(message), route(message), listDomains(), createDomain({"domain": ...}), getDomain(id), deleteDomain(id), verifyDomain(id), setWebhook(id, {"url": ...}), deleteWebhook(id), testWebhook(id), checkDomainAvailability(domain), registerDomain({"domain": ..., "contact": {...}}), listRoutes(), createRoute({...}), listMessages(), getMessage(id), retryDelivery(id).

Errors

from mailkite import MailKiteError

try:
    mk.send(msg)
except MailKiteError as e:
    print(e.status, e.message)

See the full docs.

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

mailkite_dev-0.5.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

mailkite_dev-0.5.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file mailkite_dev-0.5.0.tar.gz.

File metadata

  • Download URL: mailkite_dev-0.5.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mailkite_dev-0.5.0.tar.gz
Algorithm Hash digest
SHA256 9e089c4ffa1c9e6a2165da6169e5fe43ce971a630cd1d63e24402783e79b88bc
MD5 a1c68c53d77094f8287d84b70d019ef9
BLAKE2b-256 e79706b637d92d49b9dc4b47b2a3da8a5dc7ca40a24e95b02d35a89a92a9cce1

See more details on using hashes here.

File details

Details for the file mailkite_dev-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: mailkite_dev-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mailkite_dev-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a70bce493809e274ada17dcb367b857464bceaf1b2928f0d317f8e1a2c7879fa
MD5 ad3496489891d86fc36fb85afe05bf42
BLAKE2b-256 629c3cd125b7f96f1908038fd3fb6e84eed023e75c9cd638997a6e1b97e2d253

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