tgz-message-sdk


Nametgz-message-sdk JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryAn Official Python SDK from TechGenzi for sending messages across multiple channels like WhatsApp, *Email, *SMS. * In Future releases.
upload_time2025-10-30 06:44:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT
keywords techgenzi whatsapp sms email messaging sdk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TGZ Messaging SDK

**An Official Python SDK from TechGenzi for sending messages across multiple channels like WhatsApp, Email, and SMS.**

---

## Overview
The **TGZ Messaging SDK** provides a simple and efficient way to integrate messaging functionalities into your Python applications.  
With a focus on **WhatsApp**, this SDK allows you to send both **direct** and **broadcast** messages seamlessly.

---

## Features
- **Multi-channel support**: Easily send messages through various channels, starting with WhatsApp.  
- **Direct messaging**: Send one-to-one messages to your users.  
- **Broadcast messaging**: Send messages to multiple recipients at once.  
- **Easy integration**: A developer-friendly interface for quick and hassle-free setup.  
- **Extensible**: Designed to be easily extendable for future support of additional messaging channels.  

---

## Installation

```bash
pip install tgzmessaging-sdk
```

## How to Use

### Sending a Direct WhatsApp Message

To send a direct message, use `WhatsAppDirect` to define the message content and `WhatsAppClient` to send it.

```python
from tgz_messaging.temp.message_type.direct.whatsapp import WhatsAppDirect
from tgz_messaging.temp.message_client.whatsapp import WhatsAppClient
from tgz_messaging.temp.messaging import Messaging

# Create a direct WhatsApp message
wa_direct = WhatsAppDirect(
    account_sid="ACCOUNT-SID",
    auth_token="AUTH_TOKEN",
    event="Your Event Name",
    recipient="Recipient Number",
    params={
        "header": {
            "param1": "value1"
        },
        "body": {
            "param1": "value1",
            "param2": "value2"
        }
    }
)

# Initialize the client with the message
wa_client = WhatsAppClient(wa_direct)

# Send the message
messaging = Messaging(wa_client)
response = messaging.send_message()

print(response)
```

### Sending a Broadcast WhatsApp Message 

For sending a message to multiple recipients, use WhatsAppBroadcast.

```python
from tgz_messaging.temp.message_type.broadcast import WhatsAppBroadcast
from tgz_messaging.temp.message_client.whatsapp import WhatsAppClient
from tgz_messaging.temp.messaging import Messaging

# Create a broadcast WhatsApp message
wa_broadcast = WhatsAppBroadcast(
    account_sid="ACCOUNT-SID",
    auth_token="AUTH_TOKEN",
    event="Your Event Name",
    recipients=["+919XXXXX", "Recipient 2", "Recipient 3"],
    params={
        "header": {
            "param1": "value1"
        },
        "body": {
            "param1": "value1",
            "param2": "value2"
        }
    }
)

# Initialize the client with the message
wa_client = WhatsAppClient(wa_broadcast)

# Send the message
messaging = Messaging(wa_client)
response = messaging.send_message()

print(response)
```

## Core Modules

### Messaging

The main entry point for sending messages.  
It takes a client instance and calls its `send` method.

- **`Messaging(client: BaseClient)`** → Initializes the messaging service with a specific client.  
- **`send_message()`** → Sends the message using the provided client.

---

### WhatsAppClient

The client responsible for handling WhatsApp messages.

- **`WhatsAppClient(message_type: MessageType)`** → Initializes the client with a message type, either `WhatsAppDirect` or `WhatsAppBroadcast`.

---

### WhatsAppDirect

Used to create direct messages for WhatsApp.

```code
WhatsAppDirect(
    account_sid: str,
    auth_token: str,
    event: str,
    recipient: str,
    params: dict
)
```

- project → Your project's identifier.
- event → The type of event triggering the message.
- recipient → The phone number of the recipient.
- params → A dictionary containing message parameters (header, body, etc.).


### WhatsAppBroadcast

Used to create broadcast messages.

```code
WhatsAppBroadcast(
    account_sid: str,
    auth_token: str,
    event: str,
    recipients: list,
    params: dict
)
```

- project → Your project's identifier.
- event → The type of event for the broadcast.
- recipients → A list of recipient phone numbers.
- params → A dictionary with message parameters (header, body, etc.).


## Project Structure

The SDK is organized into the following key modules:

```code
tgz_messaging/
├── message_type/      # Contains classes for different message types (direct, broadcast)
│   ├── direct/
│   └── broadcast/
├── message_client/    # Includes clients for various messaging products like WhatsApp
└── messaging/         # Main module that orchestrates the message sending process
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tgz-message-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "TechGenzi, WhatsApp, SMS, Email, Messaging, SDK",
    "author": null,
    "author_email": "Suwethan M <suwethan.tgz@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c2/ab/8075c5ddb46554e7500dbc65c257cda6309f759ca78776c0c37f69864427/tgz_message_sdk-0.1.0.tar.gz",
    "platform": null,
    "description": "# TGZ Messaging SDK\n\n**An Official Python SDK from TechGenzi for sending messages across multiple channels like WhatsApp, Email, and SMS.**\n\n---\n\n## Overview\nThe **TGZ Messaging SDK** provides a simple and efficient way to integrate messaging functionalities into your Python applications.  \nWith a focus on **WhatsApp**, this SDK allows you to send both **direct** and **broadcast** messages seamlessly.\n\n---\n\n## Features\n- **Multi-channel support**: Easily send messages through various channels, starting with WhatsApp.  \n- **Direct messaging**: Send one-to-one messages to your users.  \n- **Broadcast messaging**: Send messages to multiple recipients at once.  \n- **Easy integration**: A developer-friendly interface for quick and hassle-free setup.  \n- **Extensible**: Designed to be easily extendable for future support of additional messaging channels.  \n\n---\n\n## Installation\n\n```bash\npip install tgzmessaging-sdk\n```\n\n## How to Use\n\n### Sending a Direct WhatsApp Message\n\nTo send a direct message, use `WhatsAppDirect` to define the message content and `WhatsAppClient` to send it.\n\n```python\nfrom tgz_messaging.temp.message_type.direct.whatsapp import WhatsAppDirect\nfrom tgz_messaging.temp.message_client.whatsapp import WhatsAppClient\nfrom tgz_messaging.temp.messaging import Messaging\n\n# Create a direct WhatsApp message\nwa_direct = WhatsAppDirect(\n    account_sid=\"ACCOUNT-SID\",\n    auth_token=\"AUTH_TOKEN\",\n    event=\"Your Event Name\",\n    recipient=\"Recipient Number\",\n    params={\n        \"header\": {\n            \"param1\": \"value1\"\n        },\n        \"body\": {\n            \"param1\": \"value1\",\n            \"param2\": \"value2\"\n        }\n    }\n)\n\n# Initialize the client with the message\nwa_client = WhatsAppClient(wa_direct)\n\n# Send the message\nmessaging = Messaging(wa_client)\nresponse = messaging.send_message()\n\nprint(response)\n```\n\n### Sending a Broadcast WhatsApp Message \n\nFor sending a message to multiple recipients, use WhatsAppBroadcast.\n\n```python\nfrom tgz_messaging.temp.message_type.broadcast import WhatsAppBroadcast\nfrom tgz_messaging.temp.message_client.whatsapp import WhatsAppClient\nfrom tgz_messaging.temp.messaging import Messaging\n\n# Create a broadcast WhatsApp message\nwa_broadcast = WhatsAppBroadcast(\n    account_sid=\"ACCOUNT-SID\",\n    auth_token=\"AUTH_TOKEN\",\n    event=\"Your Event Name\",\n    recipients=[\"+919XXXXX\", \"Recipient 2\", \"Recipient 3\"],\n    params={\n        \"header\": {\n            \"param1\": \"value1\"\n        },\n        \"body\": {\n            \"param1\": \"value1\",\n            \"param2\": \"value2\"\n        }\n    }\n)\n\n# Initialize the client with the message\nwa_client = WhatsAppClient(wa_broadcast)\n\n# Send the message\nmessaging = Messaging(wa_client)\nresponse = messaging.send_message()\n\nprint(response)\n```\n\n## Core Modules\n\n### Messaging\n\nThe main entry point for sending messages.  \nIt takes a client instance and calls its `send` method.\n\n- **`Messaging(client: BaseClient)`** \u2192 Initializes the messaging service with a specific client.  \n- **`send_message()`** \u2192 Sends the message using the provided client.\n\n---\n\n### WhatsAppClient\n\nThe client responsible for handling WhatsApp messages.\n\n- **`WhatsAppClient(message_type: MessageType)`** \u2192 Initializes the client with a message type, either `WhatsAppDirect` or `WhatsAppBroadcast`.\n\n---\n\n### WhatsAppDirect\n\nUsed to create direct messages for WhatsApp.\n\n```code\nWhatsAppDirect(\n    account_sid: str,\n    auth_token: str,\n    event: str,\n    recipient: str,\n    params: dict\n)\n```\n\n- project \u2192 Your project's identifier.\n- event \u2192 The type of event triggering the message.\n- recipient \u2192 The phone number of the recipient.\n- params \u2192 A dictionary containing message parameters (header, body, etc.).\n\n\n### WhatsAppBroadcast\n\nUsed to create broadcast messages.\n\n```code\nWhatsAppBroadcast(\n    account_sid: str,\n    auth_token: str,\n    event: str,\n    recipients: list,\n    params: dict\n)\n```\n\n- project \u2192 Your project's identifier.\n- event \u2192 The type of event for the broadcast.\n- recipients \u2192 A list of recipient phone numbers.\n- params \u2192 A dictionary with message parameters (header, body, etc.).\n\n\n## Project Structure\n\nThe SDK is organized into the following key modules:\n\n```code\ntgz_messaging/\n\u251c\u2500\u2500 message_type/      # Contains classes for different message types (direct, broadcast)\n\u2502   \u251c\u2500\u2500 direct/\n\u2502   \u2514\u2500\u2500 broadcast/\n\u251c\u2500\u2500 message_client/    # Includes clients for various messaging products like WhatsApp\n\u2514\u2500\u2500 messaging/         # Main module that orchestrates the message sending process\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An Official Python SDK from TechGenzi for sending messages across multiple channels like WhatsApp, *Email, *SMS. * In Future releases.",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "techgenzi",
        " whatsapp",
        " sms",
        " email",
        " messaging",
        " sdk"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fffd5e384852943114c4eb392edd69791a7c4533e5951d7e4c68a2095ad0db65",
                "md5": "6b9bf6d69702b9377814ef2e419f0e40",
                "sha256": "adbf7ea8ef5535567f885ab2f1b2deaf264d171c33c7164909b47f75bd34c623"
            },
            "downloads": -1,
            "filename": "tgz_message_sdk-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6b9bf6d69702b9377814ef2e419f0e40",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 12699,
            "upload_time": "2025-10-30T06:44:51",
            "upload_time_iso_8601": "2025-10-30T06:44:51.861706Z",
            "url": "https://files.pythonhosted.org/packages/ff/fd/5e384852943114c4eb392edd69791a7c4533e5951d7e4c68a2095ad0db65/tgz_message_sdk-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c2ab8075c5ddb46554e7500dbc65c257cda6309f759ca78776c0c37f69864427",
                "md5": "9a028dfc959debd12cb4067af1c414c4",
                "sha256": "9a7ed5d07a850d615589411c19d30fe3ee38b8d59e104bdc813d5b993521667b"
            },
            "downloads": -1,
            "filename": "tgz_message_sdk-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9a028dfc959debd12cb4067af1c414c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8615,
            "upload_time": "2025-10-30T06:44:53",
            "upload_time_iso_8601": "2025-10-30T06:44:53.010936Z",
            "url": "https://files.pythonhosted.org/packages/c2/ab/8075c5ddb46554e7500dbc65c257cda6309f759ca78776c0c37f69864427/tgz_message_sdk-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-30 06:44:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "tgz-message-sdk"
}
        
Elapsed time: 1.47849s