Metadata-Version: 2.4
Name: suwar
Version: 0.1.0
Summary: Client for the Suwar API: template renders, datasets, signed callbacks.
License: MIT
Project-URL: Homepage, https://suwar.app
Project-URL: Documentation, https://suwar.app/api/openapi.json
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# suwar

Client for the [Suwar](https://suwar.app) API: render a template in all its formats, render datasets, add rows, verify signed callbacks. Python 3.8+, standard library only.

```bash
pip install suwar
```

```python
import os
from suwar import Suwar, verify_signature

suwar = Suwar(api_key=os.environ["SUWAR_KEY"])
job = suwar.renders.create("tpl_7Hq2Lk9d", formats="all", variables={"titre": "L’été sous le store"})
result = job.wait()  # {"status": "done", "renders": [{"format": ..., "url": ...}]}

# Callback (callback_url): check the X-Suwar-Signature header against the raw body.
verify_signature(raw_body, headers["X-Suwar-Signature"], os.environ["SUWAR_CALLBACK_SECRET"])
```

API keys: Suwar › Développeurs › Clés API. Full reference: https://suwar.app/api/openapi.json
