Skip to the documentation
Python

Changelog

Every release of the package, newest first.

0.0.1

The first release. It covers the whole TypeScript SDK as it stood at 0.0.8, plus the changes queued after it: 430 methods in 41 namespaces, each under its TypeScript name in snake_case. A parity check proves that every one of them sends exactly the request its TypeScript twin sends, once with no options and once with every option set.

  • OpenEmail and AsyncOpenEmail have an attribute for every namespace, from emails, threads and templates to provider_imports, dns_connections and account. listAll is list_all, getActive is get_active, and tempMail is temp_mail.
  • A request body is a dict whose keys keep the API’s camelCase names, the options of a call are snake_case keyword arguments such as idempotency_key= and limit=, and a response comes back as a dict. Every body and result has a TypedDict in openemail.types, named as in TypeScript.
  • AsyncOpenEmail has the same methods with the same arguments, awaited, and runs on asyncio and on trio.
  • Every paginated resource has list for one page, list_all for every item as a list, and iterate, which yields items and fetches the next page only when it gets there.
  • An API refusal raises OpenEmailApiError, with status, type, code, param and request_id, and is_validation, is_not_found, is_rate_limited, is_step_up_required, is_retryable and the other checks. No response at all raises OpenEmailNetworkError, with is_timeout when the deadline passed.
  • from openemail import openemail is a ready-made client built from OPENEMAIL_API_KEY the first time it is touched, and init configures it once at startup. create_temp_mail and create_async_temp_mail open disposable inboxes with no credential.
  • access_token= takes an OAuth access token or a function that returns one, called before every request. verify_webhook_signature checks a delivery in constant time and returns the parsed event. client.raw.request reaches an endpoint no method wraps yet.
  • Reads are retried on 408 and 5xx, and a 429 only when it carries Retry-After. timeout bounds the whole attempt, the response body included, and a credential is never sent over plain HTTP except to a server on this machine.
  • It needs Python 3.10 or newer, and depends only on httpx, anyio and typing-extensions.