Official Python SDK for buchida email API
Project description
buchida
Official Python SDK for the buchida email API.
Installation
pip install buchida
Quick Start
from buchida import Buchida
client = Buchida("bc_live_xxxxxxxxxxxxxxxxxxxxx")
# Send an email
result = client.emails.send(
from_="hello@yourdomain.com",
to="user@example.com",
subject="Welcome to buchida!",
html="<h1>Hello!</h1><p>Welcome aboard.</p>",
)
print(f"Email sent: {result['id']}")
Features
- Full type hints
- Zero dependencies (stdlib
urllib) - Python 3.10+
- Typed dataclass responses
API Reference
Emails
client.emails.send(from_="...", to="...", subject="...", html="...", text="...")
client.emails.send_batch([{"from": "...", "to": "...", "subject": "..."}])
client.emails.get("email_id")
client.emails.list(limit=10, status="delivered")
client.emails.cancel("email_id")
Domains
client.domains.create(name="yourdomain.com")
client.domains.list()
client.domains.get("domain_id")
client.domains.verify("domain_id")
API Keys
client.api_keys.create(name="Production", permission="full_access")
client.api_keys.list()
client.api_keys.delete("key_id")
Webhooks
client.webhooks.create(url="https://example.com/webhook", events=["email.delivered"])
client.webhooks.list()
client.webhooks.delete("webhook_id")
Templates
client.templates.list()
client.templates.get("template_id")
Metrics
client.metrics.get(from_="2026-03-01", to="2026-03-31", granularity="day")
Error Handling
from buchida import Buchida, AuthenticationError, RateLimitError, BuchidaError
try:
client.emails.send(...)
except AuthenticationError:
# 401 - invalid API key
pass
except RateLimitError:
# 429 - too many requests
pass
except BuchidaError as e:
# Other API errors
print(e.status_code, e.message)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
buchida-0.1.0.tar.gz
(9.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file buchida-0.1.0.tar.gz.
File metadata
- Download URL: buchida-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d0e130ba3d7ed3173138417f492a9b4230a657ed9ee099c9dde428993c8edcc
|
|
| MD5 |
bc6ede8513519794064297ba3909f8a0
|
|
| BLAKE2b-256 |
d18e0b180a1dfceb94abc6daf483d33d5b555172a1893cb1865299da29c6342c
|
File details
Details for the file buchida-0.1.0-py3-none-any.whl.
File metadata
- Download URL: buchida-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76e216b760cb30e7ee5cdf38412f8e3104d43193f13fdfd09927028e806acd69
|
|
| MD5 |
a9381085ea5a2bdb35670c6fc449a88d
|
|
| BLAKE2b-256 |
f55c0cb589c49975a88ffdee802751d41c8c9d9d9b2d9b0c1f1d27dfd9142e82
|