Skip to main content
buchida

buchida Python SDK — Email API for AI agents

English | 한국어 | 日本語 | 中文

PyPI version License: MIT


buchida is the official Python SDK for buchida — an email API built for AI agents. buchida ships a CLI, an MCP server, and SDKs in 5 languages (Node, Python, Go, Ruby, Java), all sharing the same REST API surface. @buchida/email templates render Korean, Japanese, and Chinese natively.

Install

pip install buchida

Send your first email

import os

from buchida import Buchida

client = Buchida(os.environ["BUCHIDA_API_KEY"])

result = client.emails.send(
    from_="hello@yourapp.com",
    from_name="Your App",
    to="user@example.com",
    subject="Hello",
    html="<h1>Welcome</h1>",
)
print(result["id"], result["status"])  # unwrapped payload

# Lists are plain lists with .cursor / .has_more
page = client.emails.list(limit=20)
for item in page:
    print(item["id"], item["status"])
if page.has_more:
    next_page = client.emails.list(cursor=page.cursor)

# Filters: from_/to are sender/recipient ADDRESSES; from_date/to_date are ISO 8601 dates
client.emails.list(from_="hello@yourapp.com", from_date="2026-01-01", direction="outbound")
client.templates.list(status="published", search="welcome")

# Batch: one result per input, each with .data or .error
for r in client.emails.send_batch([
    {"from": "hello@yourapp.com", "to": "a@example.com", "subject": "A", "text": "hi"},
]):
    print(r.data if r.ok else r.error)

# Typed models (snake_case fields)
email = client.emails.get(result["id"])
print(email.from_name, email.created_at)

Upgrading to 0.2

  • The API wraps responses in {"data": ...}; the SDK now returns the unwrapped payload. emails.send() returns the email object (result["id"]), emails.list() returns a list with .cursor and .has_more, and emails.send_batch() returns a list of results that each have .data or .error.
  • Backwards compatible: result["data"] (send) and page["data"], page["cursor"], page["hasMore"] (list) still work (no warning is emitted; they are deprecated in docs only), as do "data" in res, res.get("cursor") and res.keys(). Migrate to the unwrapped form; the shim will be removed in a future major version. Caveats: list results are now list subclasses, so isinstance(res, dict) is False and an empty page is falsy (if not res).
  • emails.get, domains.get/verify, api_keys.create, webhooks.create, templates.get and metrics.get previously raised KeyError (they parsed the envelope instead of the payload); they now return populated models. Model date fields (created_at, ...) were read from camelCase keys and are now read from the API's snake_case keys.
  • New: from_name on emails.send() and the Email model; request bodies use snake_case (reply_to, scheduled_at); API errors with a nested {"error": {"message": ...}} body are surfaced correctly.

Documentation

Full docs: buchida.com/docs

License

MIT

Metadata

Release files for buchida 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for buchida 0.2.1
File Size Uploaded Provenance Actions
buchida-0.2.1.tar.gz 16.0 kB Without provenance Details for buchida-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for buchida 0.2.1
File Interpreter ABI Platform Actions
buchida-0.2.1-py3-none-any.whl Python 3 none any Details for buchida-0.2.1-py3-none-any.whl

Total release size: 24.8 kB

Release files / buchida-0.2.1.tar.gz

Download URL buchida-0.2.1.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e8496edc7f2332c3c087ed7c89a173fee5b703379191458c0a7aa60f8f28a57c
BLAKE2b-256 checksum
How to use checksums
d0d91ab654adb8af038d143b5acf666e0ba71b557cae2c1104e164dd239362a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.16

Release files / buchida-0.2.1-py3-none-any.whl

Download URL buchida-0.2.1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af37c6cbd64d06640d1e5382e4e331ff690dfa0bfdbc11c22db5a15b64175cd8
BLAKE2b-256 checksum
How to use checksums
3a2f4bd9e6e86fb3d68e74e0f66bfe2b513d9f36c664e02ebdc885b2c2838a42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.16

Security for buchida 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page