Beaco Python SDK
Official dependency-free Python SDK for events, templates, notifications, scheduled events, and suppressions.
- SDK guide: every method, with examples
- API reference and events
- Source and issues
uv add beaco # or: pip install beaco
import os
from beaco import Beaco
beaco = Beaco(os.environ["BEACO_API_KEY"])
event = beaco.events.publish(
"user.welcome",
[{"channels": ["email"], "email": "user@example.com"}],
inline={"subject": "Welcome", "html": "<h1>Welcome, Alice</h1>"},
)
# Optional sender: inline={..., "from_local": "orders", "from_name": "Winwell Orders",
# "reply_to": "support@example.com"}
template = beaco.templates.create("welcome", "email", "Hi {{ name }}")
beaco.templates.upsert_by_name("welcome", "<h1>Hi {{ name }}</h1>")
notification = beaco.notifications.retrieve("ntf_123")
scheduled = beaco.scheduled_events.create(
"renewal.reminder",
[{"channels": ["email"], "email": "user@example.com"}],
"2026-10-02T09:00:00Z",
)
suppression = beaco.suppressions.create("email", "blocked@example.com")
Attachments
Attach files to an email event with attachments. Beaco never stores them: the email provider
downloads each url when sending, so the URL must stay reachable until delivery succeeds,
including retries. size_bytes is the size you declare; up to 10 files and 30 MB in total.
beaco.events.publish(
"invoice.issued",
[{"channels": ["email"], "email": "user@example.com"}],
inline={"subject": "Your invoice", "html": "<p>Invoice attached.</p>"},
attachments=[
{"filename": "invoice.pdf", "url": "https://files.example.com/a.pdf", "size_bytes": 48213}
],
)
Invalid attachments raise ValueError before any request is made. Attachments need the Resend
email provider.
Requires Python 3.9 or newer. This package is server-only: never expose a project API key in browser code.
Metadata
Release files for beaco 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| beaco-0.2.2.tar.gz | 13.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| beaco-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.5 kB
Release files / beaco-0.2.2.tar.gz
| Download URL | beaco-0.2.2.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2d74af3405cbd1fd1c2426787197aabd61f7cbeb8373f0a55e27852ea77ddbc
|
|
BLAKE2b-256 checksum How to use checksums |
3761425d3b299dcb6932077b9ab368ffc160b75d13920f27616e27fe25e1b79e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / beaco-0.2.2-py3-none-any.whl
| Download URL | beaco-0.2.2-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
518049fff5c6c42291b09c16f61c66ec7722df6c70cc246862a01be2d70496bd
|
|
BLAKE2b-256 checksum How to use checksums |
7801f9f436f1f225f74285c1b25fb40be8ac0a856e70deb2aa4a614d58637af7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|