python-posthorn
Zero-dependency Python client for Posthorn's HTTP API.
Install locally
pip install -e ./python-posthorn
Basic usage
from python_posthorn import PosthornClient
client = PosthornClient(
"http://localhost:8888",
"your-api-key",
default_path="/api/transactional",
)
response = client.send({"message": "hello"})
print(response)
Setting the recipient
In API-key mode, each endpoint has a configured recipient (to) list — the
payload does not need a to or email field for that. To send to a
different recipient for a single request, set the reserved to_override
field to a string or a list of email addresses:
response = client.send({
"message": "hello",
"subject_line": "Greetings",
"to_override": "alice@example.com",
})
to_override only overrides recipients; the sender identity is fixed by the
endpoint configuration and cannot be overridden per-request.
Features
GET /healthzGET /metrics- authenticated JSON send requests
Idempotency-Keysupport- typed
200success and dry-run responses - typed
422validation errors - explicit exception classes for
401,409,429, and502
Metadata
Release files for python-posthorn 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_posthorn-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / python_posthorn-0.6.0-py3-none-any.whl
| Download URL | python_posthorn-0.6.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2711f61c16d9f621e673bc69fb3bc0133f22d30b7b89c88e7a37a374cbf69a05
|
|
BLAKE2b-256 checksum How to use checksums |
3f6f37a68c2a80bb1a34107ffa2fc08967ece514af660556cb9a3f499566a8d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.
Transparency log