Skip to main content

Official Zindua SDK for Python — transactional email and WhatsApp via POST /api/v1/send.

Project description

zindua-sdk

Official server-side Python SDK for Zindua: send transactional email and WhatsApp messages.

FastAPI guide zindua.run/fastapi
Full API reference zindua.run/developers
Dashboard zindua.run/login
pip install zindua-sdk

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

Quick start

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

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

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)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zindua_sdk-1.0.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zindua_sdk-1.0.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file zindua_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: zindua_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for zindua_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fbcb377b3b8b2b75471400dbd7520fcd7938602f2166fe3a347a85b7bcb5f086
MD5 6a9fef286f88053ad7dec72c1a91d2fd
BLAKE2b-256 dbb68c33bc8f00a0e4cdf226107574325abd48baffb4d9ae7746fac3aca8d27b

See more details on using hashes here.

File details

Details for the file zindua_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: zindua_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for zindua_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9583d41f7da4c91540920a7d40f0aba4c8eda2b2b97542dffdb2ef6c7832590d
MD5 8e311ae7f50c151fa8d198e4c65457b4
BLAKE2b-256 3089d3e04c218b833748b8f887b28cd4ba980220abd45017d829a7089662aedb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page