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.12.tar.gz (21.3 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.12-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: waclient-0.1.12.tar.gz
  • Upload date:
  • Size: 21.3 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.12.tar.gz
Algorithm Hash digest
SHA256 4bcf2d517159a5131d18016b1f80e036e9b0a13b0e73680d939d2b34a635e5bd
MD5 8dbaefdb8c867c0b7cb761d1e372ae6d
BLAKE2b-256 5f2d3016c51be5ed75ba6929238d78654e4f7369a3fe2b1bdaadc601aa696804

See more details on using hashes here.

Provenance

The following attestation bundles were made for waclient-0.1.12.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.12-py3-none-any.whl.

File metadata

  • Download URL: waclient-0.1.12-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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 14cb278eb769c03c2b110d548d3e57c936e84ce4de83712244128c9727d8f4d4
MD5 88b7db9212e98cb763f1a7eb1ab76093
BLAKE2b-256 cc5e729a329edde0cbf3eb83e5a6ce412d061b7dd43ff181321abcf7dff0581c

See more details on using hashes here.

Provenance

The following attestation bundles were made for waclient-0.1.12-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