Skip to main content

Official Python client for Axene Mailer: send receipts, confirmations, and campaigns from your own domain. Priced in KES, billed via M-Pesa.

Project description

axene-mailer (Python)

Official Python client for Axene Mailer. Send receipts, confirmations, and campaigns from your own domain, priced in KES, billed via M-Pesa.

Pure standard library: no runtime dependencies. Python 3.8+.

Install

pip install axene-mailer

Usage

from axene_mailer import Axene

axene = Axene(api_key="axm_k_your_api_key")

res = axene.emails.send({
    "from": {"email": "hello@yourdomain.com", "name": "Your Shop"},
    "to": "customer@example.com",
    "subject": "Your receipt",
    "html": "<p>Thanks for your order.</p>",
    "text": "Thanks for your order.",
})
print("queued", res["id"])

from, to, cc, bcc accept a string, a {"email", "name"} dict, or a list of either.

More

axene.emails.send_batch([{...}, {...}])      # bare array under the hood
axene.emails.get(res["id"])                   # status
axene.emails.validate({...})                  # dry-run: would this send?
axene.domains.list()                          # your sending domains

# Scheduling (Starter plan and up)
from datetime import datetime, timedelta, timezone
axene.emails.send({..., "send_at": datetime.now(timezone.utc) + timedelta(hours=1)})

Errors and retries

Non-2xx responses raise AxeneError (.status, .code, .args[0] message). The client retries 429 and 5xx with exponential backoff (configurable via max_retries).

Get an API key at mail.axene.io. Docs: https://axene.io/docs/mailer/getting-started/welcome.

MIT (c) Axene Solutions

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

axene_mailer-0.1.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

axene_mailer-0.1.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file axene_mailer-0.1.0.tar.gz.

File metadata

  • Download URL: axene_mailer-0.1.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for axene_mailer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dc75b9771d3a658026d90965202b905a09f2e7e9f2ac2255883a25594bc8e25f
MD5 4ce8b25a921ffd6cca262333f21d56e4
BLAKE2b-256 3783eb28d79d75c3eb70088a8aa19d9f7386b68e156f9213976437b27e91e5f5

See more details on using hashes here.

Provenance

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

Publisher: release.yml on Axene-Solutions/axene-sdks

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

File details

Details for the file axene_mailer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: axene_mailer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for axene_mailer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89cc9e7c2098575539181cf58c6e90091707f16f2ec3b74ac65d3fa5f24b474a
MD5 8b05ccf22ca166e9dbbd082e7b94cbf4
BLAKE2b-256 23ac723d034b2a8884af5d8553a6bb5dcea6292dcbfff59dc3dcc8837b12eb7b

See more details on using hashes here.

Provenance

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

Publisher: release.yml on Axene-Solutions/axene-sdks

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

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