Metadata-Version: 2.4
Name: mailtruss
Version: 0.3.0
Summary: Python client for the Mailtruss email API (no dependencies)
Author-email: Mailtruss <hello@mailtruss.com>
License-Expression: MIT
Project-URL: Homepage, https://mailtruss.com
Project-URL: Documentation, https://mailtruss.com/docs
Keywords: email,transactional-email,email-api,mailtruss
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Communications :: Email
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# mailtruss (Python)

Python client for the [Mailtruss](https://mailtruss.com) email API. `pip install mailtruss`.

No dependencies. Python 3.9+.

```python
from mailtruss import Mailtruss
m = Mailtruss(api_key="ms_live_…")          # or set MAILTRUSS_API_KEY
m.emails.send(from_="Ada <ada@yourdomain.com>", to="you@example.com", subject="Hi", html="<p>Hello</p>", idempotency_key="order-42")
m.contacts.create(email="ann@example.com", first_name="Ann", tags=["beta"])
m.broadcasts.create(name="News", from_="news@yourdomain.com", subject="Hello", html="<p>…</p>")
```

Every resource of the HTTP API is covered (see `/api/v1/openapi.json`). `from_` is sent as `from`. A send is retried only when you pass an `idempotency_key`; reads and deletes retry on 429 and 5xx.

Run the tests: `python3 -m unittest discover -s tests` from this folder.
