Skip to main content

Easily send WhatsApp messages from Python using the Meta WhatsApp Cloud API.

Project description

WhatsApp Message Sender Library

Easily send WhatsApp messages from your Python code using the official Meta WhatsApp Cloud API.

What Problem Does This Solve?

  • No more struggling with raw HTTP requests or complex setup.
  • Just plug in your Meta API credentials and send messages with a single function call.
  • Perfect for notifications, alerts, or any automation that needs WhatsApp messaging.

Features

  • Simple, plug-and-play API
  • Input validation and clear error messages
  • Custom exception handling

Quick Start

  1. Install dependencies:

    pip install my-wp-tools
    
  2. Example usage:

    from my_wp_tools.client import WhatsAppClient
    
    client = WhatsAppClient(
        access_token="YOUR_META_TOKEN",
        phone_number_id="YOUR_PHONE_NUMBER_ID",
        business_account_id="YOUR_BUSINESS_ACCOUNT_ID"
    )
    
    try:
        client.send_message(
            to="+1234567890",
            message="Hello from my library!"
        )
    except Exception as e:
        print("Error sending message:", e)
    

Dependencies

  • Python 3.7+
  • requests

Note

  • You need a valid Meta (Facebook) WhatsApp Cloud API token, phone number ID, and business account ID.
  • This library is for sending messages only (no incoming message/webhook support in v1).

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

my_wp_tools-0.1.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

my_wp_tools-0.1.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file my_wp_tools-0.1.2.tar.gz.

File metadata

  • Download URL: my_wp_tools-0.1.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for my_wp_tools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 003cd4e4bb1280b67942ee5bb9edaa70413cadb527bd1551724a9a56fd4d02b4
MD5 287e5cfc2197130f3640b623bcad3eb2
BLAKE2b-256 4ae1debe0aaf174e5f9744b57f28f943cb8a23e74538958baa903ae61fb93bae

See more details on using hashes here.

File details

Details for the file my_wp_tools-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: my_wp_tools-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for my_wp_tools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c2260d3e3cbc85b8245819e71c34c97fb707da63e90a53228cb853e803d59fe3
MD5 bd02371e9c29be2b458d299456fa1c86
BLAKE2b-256 ccdd5963cd9f624fbf499ee092db50752f7da4c1e36bc90d4db12ace69fbfc08

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