Metadata-Version: 2.4
Name: sendbaze
Version: 0.1.0
Summary: Official Python SDK for the Sendbaze email and SMS API. Standard library only.
Author-email: Sendbaze <support@sendbaze.com>
License: MIT
Project-URL: Homepage, https://www.sendbaze.com
Project-URL: Documentation, https://docs.sendbaze.com/get-started/send-with/python
Project-URL: Repository, https://github.com/sendbaze/sendbaze
Keywords: sendbaze,email,sms,south africa,api,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Communications :: Email
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# sendbaze

Official Python SDK for the [Sendbaze](https://www.sendbaze.com) email and SMS API. Standard
library only, Python 3.9+.

```bash
pip install sendbaze
```

```python
from sendbaze import Sendbaze, SendbazeError

sendbaze = Sendbaze()  # reads SENDBAZE_API_KEY, or pass api_key="sk_live_..."

try:
    email = sendbaze.emails.send(
        from_="Yourshop <orders@yourshop.co.za>",
        to="thandi@example.com",
        subject="Your order #1042 has shipped",
        html="<p>Tracking: <b>CG123456789ZA</b></p>",
        idempotency_key="order-1042-shipped",
    )
    print(email.id)  # em_01j9...
except SendbazeError as error:
    print(error.status, error.code, error.fields, error.request_id)
```

`from_` and `class_` stand in for the reserved words; snake_case arguments such as `reply_to`,
`template_id` and `content_type` are converted to the API's camelCase names. Every method returns
a dict with attribute access.

Resources: `emails` (send, batch, get, list), `templates`, `domains`, `suppressions`,
`webhooks`, `sms`, `usage`, plus `verify_webhook_signature` for incoming webhooks.

Full guide: https://docs.sendbaze.com/get-started/send-with/python

## Develop

```
python -m unittest discover -s packages/sdk-python/tests
python -m build packages/sdk-python && python -m twine upload packages/sdk-python/dist/*
```
