Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Helo Python SDK

Helo Email API (https://helohq.com)

Installation

pip install sdk_helo_email

Requires Python 3.10+ and installs httpx and pydantic automatically.

Quick start

import sdk_helo_email as helo

# The API key is read from HELO_API_KEY when not passed explicitly.
client = helo.Helo()

paginated_events = client.activity.list_events(
    channel_id="550e8400-e29b-41d4-a716-446655440000",
    message_id="550e8400-e29b-41d4-a716-446655440000",
)

Pass the key directly when you manage several accounts or read it from a secrets manager:

client = helo.Helo(api_key="your-api-key")

Override the base URL, timeout, or retry count (defaults: https://api.helohq.com, 30 seconds, 2 retries):

client = helo.Helo(
    base_url="https://api.helohq.com",
    timeout=60.0,
    max_retries=2,
)

Use with so the underlying connection pool is closed:

with helo.Helo() as client:
    ...

Async

AsyncHelo mirrors the synchronous API; every resource method becomes a coroutine.

import asyncio
import sdk_helo_email as helo


async def main() -> None:
    async with helo.AsyncHelo() as client:
        paginated_events = await client.activity.list_events(
            channel_id="550e8400-e29b-41d4-a716-446655440000",
            message_id="550e8400-e29b-41d4-a716-446655440000",
        )


asyncio.run(main())

Automatic retries

Connection errors, timeouts, 429, and 5xx responses are retried with exponential backoff and full jitter. A Retry-After header is honoured when present. Set max_retries=0 to disable.

Resources

Attribute Documentation
client.activity docs/Activity.md
client.broadcasts docs/Broadcasts.md
client.channels docs/Channels.md
client.domains docs/Domains.md
client.sending docs/Sending.md
client.statistics docs/Statistics.md
client.suppressions docs/Suppressions.md
client.webhooks docs/Webhooks.md

Error handling

Every API error subclasses APIError and carries .status_code, .error_code, .detail, and .request_id. RateLimitError also exposes .retry_after.

import sdk_helo_email as helo

try:
    paginated_events = client.activity.list_events(
except helo.AuthenticationError as exc:
    print(f"auth failed: {exc} (status {exc.status_code})")
except helo.APIError as exc:
    print(f"API error {exc.status_code}: {exc}")
Exception HTTP status
BadRequestError 400
AuthenticationError 401
PermissionDeniedError 403
NotFoundError 404
ConflictError 409
UnprocessableEntityError 422
RateLimitError 429
InternalServerError 5xx

Network failures raise APIConnectionError (or APITimeoutError) once retries are exhausted. Both subclass HeloError, the base of every exception this library raises.

Development

make install
make check
make test

Metadata

Release files for sdk-helo-email 1.0.0b9

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

Source distribution (sdist)

Source distribution for sdk-helo-email 1.0.0b9
File Size Uploaded
sdk_helo_email-1.0.0b9.tar.gz 22.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sdk-helo-email 1.0.0b9
File Interpreter ABI Platform
sdk_helo_email-1.0.0b9-py3-none-any.whl Python 3 none any Details

Total release size: 48.8 kB

Release files / sdk_helo_email-1.0.0b9.tar.gz

Download URL sdk_helo_email-1.0.0b9.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3e3235baf5b08b16e44e5f2f63d0c5bf149612422c3eafa76cb2b40c4c975d59
BLAKE2b-256 checksum
How to use checksums
472f5bfd4e9f1f9c0f4947bd55641ca00e6222b0485e684f1cfee5f370072b70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.4

Release files / sdk_helo_email-1.0.0b9-py3-none-any.whl

Download URL sdk_helo_email-1.0.0b9-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45c2140f298f9b847b19e5348eeab5474d7c6e7a66aa5fe1a06c98ff16b2b903
BLAKE2b-256 checksum
How to use checksums
50095369451a4c9eec6b6107bd962e13b7dfd4e91856e9706949443510f588cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.4
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