Skip to main content

Simplified Python SDK for WhatsApp Business Cloud API

Project description

WhatsApp Biz

Simplified Python SDK for WhatsApp Business Cloud API

PyPI version License: MIT Python Versions

waclient is a clean, easy-to-use Python wrapper for the WhatsApp Business Cloud API. It handles authentication, message composition (text, media, interactive), and media management, allowing you to build WhatsApp bots and integrations quickly.

Features

  • Easy Authentication: Simple client initialization.
  • Rich Messaging: Send Text, Image, Video, Audio, Document, Sticker, Location, and Contact messages.
  • Interactive Elements: Support for Reply Buttons and List Messages.
  • Templates: Full support for WhatsApp Template Messages.
  • Media Handling: Upload and retrieve media easily.

Installation

pip install waclient

Quick Start

from waclient import WhatsAppClient

client = WhatsAppClient(
    phone_number_id="YOUR_PHONE_ID",
    access_token="YOUR_ACCESS_TOKEN"
)

client.messages.send_text(to="15551234567", body="Hello form WhatsApp Biz!")

Documentation

  • User Manual: Detailed verification of all features, code examples, and configuration.
  • Developer Guide: Setup for contributors, running tests, and project structure.

⚠️ WhatsApp 24-Hour Messaging Rule (Important)

WhatsApp enforces a 24-hour customer service window.

  • Free-form messages can be sent only within 24 hours after a user’s last message.
  • After 24 hours, businesses must use approved WhatsApp Template Messages.
  • This is a WhatsApp platform rule, not a limitation of waclient.

How waclient handles this

  • Supports session messages (within 24 hours)
  • Supports template messages (can be sent anytime)
  • Webhook-based message tracking helps manage the 24-hour window

📌 Popular platforms like Amazon, Flipkart, Swiggy also use template messages for notifications.

Examples

Check the examples/ directory for ready-to-run scripts:

  • examples/verify_features.py: comprehensive tour of features.
  • examples/verify_delivery.py: delivery status verification.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Surenthar
Email: surentharsenthilkumar2003@gmail.com

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

waclient-0.1.9.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

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

waclient-0.1.9-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file waclient-0.1.9.tar.gz.

File metadata

  • Download URL: waclient-0.1.9.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for waclient-0.1.9.tar.gz
Algorithm Hash digest
SHA256 7b3d85eef1a878377ffd255d1345965139ac29fa0111d2fc91fe961415ac9fe9
MD5 92098088aa6419fde815c1a932b700fc
BLAKE2b-256 3db26c9fb15f350f36d11ae5a61ea05b00c55cddaed82cb2d13074f3ceb3b4c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for waclient-0.1.9.tar.gz:

Publisher: workflow.yml on surenthars/waclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file waclient-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: waclient-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for waclient-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9f8efcca2fc275b978c82506df1d282168210f375458936b0b7f9d941fe9a3e5
MD5 c2a73e5c9703c4438a39ab9d590b58ed
BLAKE2b-256 036daea640b45396ccdb491702dc75a07e341d2740e1672a762789adc90f0825

See more details on using hashes here.

Provenance

The following attestation bundles were made for waclient-0.1.9-py3-none-any.whl:

Publisher: workflow.yml on surenthars/waclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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