Skip to main content

weezy-sdk

Typed SMS and WhatsApp clients for Python 3.11+.

Installation

pip install weezy-sdk

The package is named weezy-sdk; import clients from weezy.

For local development, install from this repository with pip install ./python.

Synchronous client

import os
from weezy import Weezy, WeezyError

with Weezy(
    client_id=os.environ['WEEZY_CLIENT_ID'],
    client_secret=os.environ['WEEZY_CLIENT_SECRET'],
) as client:
    wallet = client.sms.balance()
    print(f"Balance: {wallet['balance']:.3f} points")  # 1 point = 1 EUR
    message = client.sms.send(body={
        'to': '+2250700000000', 'body': 'Bonjour !', 'sender_name': 'WEEZY',
    })
    print(f"Cost: {message['cost']} points")
    status = client.sms.status(message_x_id=message['x_id'])
    result = client.whatsapp(os.environ['WEEZY_INSTANCE_ID']).messages.send_text_message(body={
        'phone': '2250700000000', 'message': 'Bonjour !',
    })

Asynchronous client

import asyncio
import os
from weezy import AsyncWeezy

async def main():
    async with AsyncWeezy(
        client_id=os.environ['WEEZY_CLIENT_ID'],
        client_secret=os.environ['WEEZY_CLIENT_SECRET'],
    ) as client:
        wallet = await client.sms.balance()
        print(f"Balance: {wallet['balance']:.3f} points")

asyncio.run(main())

Send methods create real messages with live credentials. Use a dedicated test account and recipient when testing.

SMS methods: balance(), senders(), send(body=...), send_bulk(body=...), status(message_x_id=...), opt_outs(body=...). All arguments are keyword-only. WhatsApp resource methods match the backend handler names; see the full reference.

WeezyError exposes status, details and request_id. A timeout or transport failure has status 0. Close clients with close() / await aclose() or use the context managers above. Options include base_url (full client API prefix), timeout in seconds and an injectable httpx transport. No automatic retries.

SMS amounts (balance, cost, unit_price, amount_reserved, ...) are float values in points (1 point = 1 EUR, up to 3 decimals), with unit == 'point' on the object.

TypedDict request and response contracts are exported from weezy.types. They support editor/type-checker assistance; runtime validation remains on the API.

WhatsApp account access

WhatsApp is disabled by default for every customer account. An administrator must enable it for that customer before WhatsApp API credentials and methods can be used. Existing credentials do not bypass this account setting. The API returns HTTP 404 when WhatsApp access is unavailable; a 404 can also mean a missing resource. The SDK preserves this error and does not retry or enable access. SMS access is independent. Enabled accounts still need valid credential scopes, a subscription and a connected instance.

The SDK only covers the public client API: account activation and Google OAuth login belong to the dashboard and are not SDK methods.

Metadata

Release files for weezy-sdk 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weezy-sdk 0.2.1
File Size Uploaded Provenance
weezy_sdk-0.2.1.tar.gz 16.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for weezy-sdk 0.2.1
File Interpreter ABI Platform
weezy_sdk-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.0 kB

Release files / weezy_sdk-0.2.1.tar.gz

Download URL weezy_sdk-0.2.1.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bed1619af957622b7d6d08603ef8b533f54019f6cb158121706013bab5feecc9
BLAKE2b-256 checksum
How to use checksums
13904c25b8da2d73fba569e68e836d1f51cc59517bee0cca1122169fcc44420a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / weezy_sdk-0.2.1-py3-none-any.whl

Download URL weezy_sdk-0.2.1-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
167b60d448d2e79456eef51925c7f59b4893fb1e8970e79f13c8a7757c0eadcb
BLAKE2b-256 checksum
How to use checksums
c62f6da72d968f5979752ea406d75e4130b715f2fd65771cabea6fbe9398baac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Security for weezy-sdk 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for weezy_sdk-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page