Skip to main content

weezy-sdk

Typed SMS 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 XOF (FCFA)
    message = client.sms.send(body={
        'to': '+2250700000000', 'body': 'Bonjour !', 'sender_name': 'DEFAULT', 'sandbox': True,
    })
    print(f"Cost: {message['cost']} points")
    status = client.sms.status(message_x_id=message['x_id'])

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())

Set sandbox: True in the request body to simulate an SMS without contacting a provider, debiting balance or consuming the free allowance. Omit it or use False for a real, normally billed send. Authentication, active country and sender rules still apply.

SMS methods: balance(), senders(), send(body=...), send_bulk(body=...), status(message_x_id=...), opt_outs(body=...), create_otp(body=...), verify_otp(challenge_id=..., body=...). All arguments are keyword-only. 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 XOF (FCFA), 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.

Sandbox and DEFAULT sender

DEFAULT selects the platform sender enabled by the administrator for the destination country. It remains available after free test segments are exhausted; real sends are billed normally. Sandbox is a per-request flag on send, bulk send and OTP creation, not a separate base URL or credential. Simulated messages have source: "sandbox". Managed sandbox OTP uses 123456; check both verified and sandbox and never authorize a real session with a sandbox result.

Version 0.4.0 includes sandbox request types and managed OTP methods.

Metadata

Release files for weezy-sdk 0.4.0

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.4.0
File Size Uploaded Provenance
weezy_sdk-0.4.0.tar.gz 8.8 kB With provenance Details

Built distribution (wheel)

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

Total release size: 16.2 kB

Release files / weezy_sdk-0.4.0.tar.gz

Download URL weezy_sdk-0.4.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
993ce1b121feaf80461e3ef506df5d5847b7c899450270c22f42e38fcb91414b
BLAKE2b-256 checksum
How to use checksums
7043d7a5558a18362e1cc386ae28f9dec3ebf74f91a95e438a7d4fe01d26345a
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 12, 2026.

Transparency log

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

Download URL weezy_sdk-0.4.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a704c7bdaaabedb73429a4b4a5400ec40dcb93261c06d9cfd6e2a0608623aa5
BLAKE2b-256 checksum
How to use checksums
a37dcc0d50d7f16fdaa9b82f721e5de6744c57e5f2f509be08ea1ccf812495bc
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 12, 2026.

Transparency log

Security for weezy-sdk 0.4.0

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.4.0.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 12, 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