Async-first
Use httpx.AsyncClient inside FastAPI routes for non-blocking sends.

Async Python backends with the official zindua-sdk v1.2.1. send(), get_log(), multilingual templates, attachments, and FastAPI Depends().
pip install zindua-sdkpip install "zindua-sdk[fastapi]" uvicorn python-dotenvPython 3.10+. PyPI package: pip install zindua-sdk. FastAPI extras are optional for this guide.
Use httpx.AsyncClient inside FastAPI routes for non-blocking sends.

ZINDUA_API_KEY stays in .env. Never expose it to Swagger from a public browser without auth.

Same REST payload as Node and PHP. Switch channel in JSON.

zindua-sdk validates payloads locally, async send(), get_log(), and FastAPI Depends().
Wrap the send helper in FastAPI Depends() for clean route handlers.

python -m zindua doctor or npx @zindua/cli (Node). Then exercise routes in /docs.

Pick a file in the explorer. Same layout as your IDE.
# PyPI (SDK only, same as pypi.org/project/zindua-sdk)
pip install zindua-sdk
# This guide: FastAPI + uvicorn + dotenv (optional)
pip install "zindua-sdk[fastapi]" uvicorn python-dotenvFour steps in the dashboard, then verify below.
Four steps in the dashboard, then pip install and verify.
Project + default language
Dashboard → Projects → create project. Copy znd_test_… or znd_live_…. Set default language (fr, en, …), used when you omit lang in send().
CLI or script. Runs against zindua.run with your API key.
# After: pip install zindua-sdk (Python 3.10+)
export ZINDUA_API_KEY=znd_test_your_key_here
# 1) Key format + GET /project + channel readiness
python -m zindua doctor
# 2) Queue a test message (use your template slug from Dashboard → Templates)
python -m zindua send \
--to you@example.com \
--template otp-verification \
--var code=482910 \
--var appName=MyApp
# WhatsApp (E.164 with +)
python -m zindua send \
--to +243812345678 \
--channel whatsapp \
--template otp-verification \
--var code=482910Official package on PyPI
Requires Python 3.10+. Full README mirrors this guide.
https://pypi.org/project/zindua-sdk/From project key to Swagger /docs.
From PyPI install to Swagger /docs on localhost.
Create a Zindua project
Sign up at zindua.run, create a project, copy the API key. Connect email (Gmail/SMTP Service) and/or WhatsApp in the dashboard. Create templates (e.g. otp-verification) in each language you need.
Swagger, multilingual sends, attachments, OTP storage, Depends(), and response shape.
Swagger /docs
FastAPI generates OpenAPI automatically. Exercise routes before wiring a frontend.
from pydantic import BaseModel, EmailStr, Fieldfrom fastapi import Dependsfrom zindua.integrations.fastapi import get_zinduafrom zindua import Zindua class SendOtpRequest(BaseModel): to: EmailStr code: str = Field(min_length=4, max_length=8) lang: str | None = Field(default=None, examples=["fr", "en"]) @app.post("/send-otp", tags=["Zindua"])async def send_otp(body: SendOtpRequest, zindua: Zindua = Depends(get_zindua)): return await zindua.send( to=str(body.to), template="otp-verification", lang=body.lang, variables={"code": body.code}, ) # uvicorn main:app --reload --port 8000# Swagger UI: http://127.0.0.1:8000/docsPOST /send fields, languages, endpoints, errors, security, and environment variables.
Same JSON as @zindua/sdk on Node. Validate with Pydantic before calling send().
to
Email if channel is email (default). E.164 phone with + for WhatsApp (e.g. +243812345678).
Every send() returns logId. Poll GET /logs/{logId} from your backend, persist logId in your database, or use Dashboard → Logs and webhooks (email.delivered / email.failed).
Prefer python -m zindua (ships with zindua-sdk). npx @zindua/cli is the same API checks but requires Node 18+ on your machine. Neither is imported from Python code.
# Official Python CLI (recommended)python -m zindua doctorpython -m zindua send --to user@example.com --template otp-verification --var code=482910 # Optional Node CLI (dev machine with Node installed)npx @zindua/cli@latest doctor # Raw HTTP without CLIcurl -H "Authorization: Bearer $ZINDUA_API_KEY" https://zindua.run/api/v1/projectQuick check without Node: python -m zindua doctor
Use @zindua/sdk with Fastify or Next.js for typed send() on Node 18+.