Metadata-Version: 2.4
Name: sendeez
Version: 0.1.0
Summary: Zero-dependency Python SDK for the Sendeez transactional email API.
Project-URL: Homepage, https://github.com/lucassms9/sendeez/tree/main/packages/sdk-python#readme
Project-URL: Repository, https://github.com/lucassms9/sendeez
Project-URL: Issues, https://github.com/lucassms9/sendeez/issues
Author: Sendeez
License-Expression: MIT
License-File: LICENSE
Keywords: api,email,sdk,sendeez,transactional-email
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# sendeez

Zero-dependency Python SDK for the Sendeez transactional email API.

```python
import os
from sendeez import Sendeez

sendeez = Sendeez(os.environ["SENDEEZ_API_KEY"])

email = sendeez.emails.send(
    {
        "from": {"email": "hello@example.com", "name": "Example"},
        "to": [{"email": "developer@example.com"}],
        "subject": "Welcome",
        "text": "Your account is ready.",
    },
    # Optional. The SDK generates one when omitted.
    idempotency_key="welcome-user-123",
)

print(email["id"], email["status"])
```

## Errors and agent actions

```python
from sendeez import Sendeez, SendeezError

try:
    sendeez.emails.send(message)
except SendeezError as error:
    print(error.code, error.param, error.request_id, error.action, error.retry_after)
```

The SDK retries GET requests and mutations carrying an idempotency key after
network errors, `429`, or `5xx`. It never automatically retries an unsafe
mutation.

Every method accepts a `timeout` (seconds). This lets applications and AI
agents enforce their own execution deadline:

```python
sendeez.emails.list(timeout=5)
```

## Testing

Pass `opener` to substitute a fake transport, the same role `fetch`
injection plays in the Node SDK:

```python
def fake_opener(request, timeout):
    ...  # return an object with .status/.getcode() and .read()

sendeez = Sendeez("sendeez_example_secret", opener=fake_opener)
```
