Metadata-Version: 2.4
Name: zindua-sdk
Version: 1.0.0
Summary: Official Zindua SDK for Python — transactional email and WhatsApp via POST /api/v1/send.
Project-URL: Homepage, https://zindua.run/fastapi
Project-URL: Documentation, https://zindua.run/developers
Project-URL: Repository, https://github.com/bbasabana/zindua
Author-email: Zindua <hello@zindua.run>
License-Expression: MIT
License-File: LICENSE
Keywords: email,fastapi,otp,sdk,transactional,whatsapp,zindua
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.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Provides-Extra: dev
Requires-Dist: fastapi>=0.110.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: uvicorn>=0.29.0; extra == 'dev'
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.110.0; extra == 'fastapi'
Description-Content-Type: text/markdown

# zindua-sdk

Official **server-side** Python SDK for [Zindua](https://zindua.run): send transactional **email** and **WhatsApp** messages.

| | |
|---|---|
| FastAPI guide | [zindua.run/fastapi](https://zindua.run/fastapi) |
| Full API reference | [zindua.run/developers](https://zindua.run/developers) |
| Dashboard | [zindua.run/login](https://zindua.run/login) |

```bash
pip install zindua-sdk
```

**Requirements:** Python 3.10+, run only on your **backend** (never ship `ZINDUA_API_KEY` to browsers).

## Quick start

```python
import asyncio
from zindua import Zindua

async def main():
    client = Zindua(api_key="znd_test_xxxxxxxxxxxxxxxxxxxxxxxx")
    result = await client.send(
        to="user@example.com",
        template="otp-verification",
        lang="fr",
        variables={"code": "482910", "appName": "MyApp"},
    )
    print(result.log_id, result.status)

asyncio.run(main())
```

## FastAPI

```python
from zindua.integrations.fastapi import get_zindua

@app.post("/send-otp")
async def send_otp(body: SendOtpRequest, zindua: Zindua = Depends(get_zindua)):
    return await zindua.send(to=body.to, template="otp-verification", variables={"code": body.code})
```

## CLI

```bash
export ZINDUA_API_KEY=znd_test_...
python -m zindua doctor
python -m zindua send --to user@example.com --template otp-verification --var code=482910
```

## Publish (maintainers)

```bash
cd packages/zindua-python
python -m pip install build twine
python -m build
twine upload dist/*
```

Bump `version` in `pyproject.toml` and `PYTHON_SDK_VERSION` in the app before each release.

## License

MIT © [Zindua](https://zindua.run)
