pygwan


Namepygwan JSON
Version 0.2.7 PyPI version JSON
download
home_pagehttps://github.com/lordskyzw/pygwan
SummaryOfficial Python wrapper for the WhatsApp Cloud API by Tarmica Chiwara
upload_time2024-10-15 00:02:39
maintainerNone
docs_urlNone
authorTarmica Chiwara
requires_python>=3.7
licenseMIT
keywords whatsapp api messaging chatbot opensource
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pygwan

Unofficial Python wrapper for the WhatsApp Cloud API by <b>[Tarmica Chiwara](https://github.com/lordskyzw)</b>.

## Installation

To install the WhatsApp Python wrapper, use the following command:

```bash
pip install pygwan
```

## Usage

Import the `WhatsApp` class from the package and initialize an instance with your WhatsApp token and phone number ID:

```python
from pygwan import WhatsApp

whatsapp = WhatsApp(token="your_token", phone_number_id="your_phone_number_id")
```

### Sending a Message

You can send a text message to a WhatsApp user using the `send_message` method:

```python
whatsapp.send_message("Hello, this is a test message.", "recipient_phone_number")
```

### Replying to a Message

Reply to a message using the `reply_to_message` method:

```python
whatsapp.reply_to_message("message_id", "recipient_phone_number", "Reply message.")
```

### Sending a Template

Send a template message using the `send_template` method:

```python
components = [
    # List of template components
    # Example: {"type": "text", "text": "Hello, this is a template message."}
]
whatsapp.send_template("template_name", "recipient_phone_number", components)
```

### Sending a Location

Send a location message using the `send_location` method:

```python
whatsapp.send_location("-23.564", "-46.654", "Location Name", "Location Address", "recipient_phone_number")
```

### Sending an Image

Send an image message using the `send_image` method:

```python
image_link = "https://example.com/image.jpg"
whatsapp.send_image(image_link, "recipient_phone_number")
```


For more detailed usage and information, please refer to the official documentation in the code lol

## License

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lordskyzw/pygwan",
    "name": "pygwan",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "whatsapp, api, messaging, chatbot, opensource",
    "author": "Tarmica Chiwara",
    "author_email": "Tarmica Chiwara <tarimicac@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/72/e3/8725b6eb5b17e60dbf42a308587bceacc0c7e504f817ae978c8f8bdc6faa/pygwan-0.2.7.tar.gz",
    "platform": null,
    "description": "# Pygwan\n\nUnofficial Python wrapper for the WhatsApp Cloud API by <b>[Tarmica Chiwara](https://github.com/lordskyzw)</b>.\n\n## Installation\n\nTo install the WhatsApp Python wrapper, use the following command:\n\n```bash\npip install pygwan\n```\n\n## Usage\n\nImport the `WhatsApp` class from the package and initialize an instance with your WhatsApp token and phone number ID:\n\n```python\nfrom pygwan import WhatsApp\n\nwhatsapp = WhatsApp(token=\"your_token\", phone_number_id=\"your_phone_number_id\")\n```\n\n### Sending a Message\n\nYou can send a text message to a WhatsApp user using the `send_message` method:\n\n```python\nwhatsapp.send_message(\"Hello, this is a test message.\", \"recipient_phone_number\")\n```\n\n### Replying to a Message\n\nReply to a message using the `reply_to_message` method:\n\n```python\nwhatsapp.reply_to_message(\"message_id\", \"recipient_phone_number\", \"Reply message.\")\n```\n\n### Sending a Template\n\nSend a template message using the `send_template` method:\n\n```python\ncomponents = [\n    # List of template components\n    # Example: {\"type\": \"text\", \"text\": \"Hello, this is a template message.\"}\n]\nwhatsapp.send_template(\"template_name\", \"recipient_phone_number\", components)\n```\n\n### Sending a Location\n\nSend a location message using the `send_location` method:\n\n```python\nwhatsapp.send_location(\"-23.564\", \"-46.654\", \"Location Name\", \"Location Address\", \"recipient_phone_number\")\n```\n\n### Sending an Image\n\nSend an image message using the `send_image` method:\n\n```python\nimage_link = \"https://example.com/image.jpg\"\nwhatsapp.send_image(image_link, \"recipient_phone_number\")\n```\n\n\nFor more detailed usage and information, please refer to the official documentation in the code lol\n\n## License\n\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Official Python wrapper for the WhatsApp Cloud API by Tarmica Chiwara",
    "version": "0.2.7",
    "project_urls": {
        "Homepage": "https://github.com/lordskyzw/pygwan",
        "Repository": "https://github.com/lordskyzw/pygwan"
    },
    "split_keywords": [
        "whatsapp",
        " api",
        " messaging",
        " chatbot",
        " opensource"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "119d14f55632f292cc38a366c987a200eb4ebd7aa5a2a173fd81c3520cbd6826",
                "md5": "206f55f321308cc3f9b110a564590397",
                "sha256": "f33cd967a897e8bc109162978a7935bb49688ee20b82512a0bdc6063087a268f"
            },
            "downloads": -1,
            "filename": "pygwan-0.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "206f55f321308cc3f9b110a564590397",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 15686,
            "upload_time": "2024-10-15T00:02:38",
            "upload_time_iso_8601": "2024-10-15T00:02:38.137969Z",
            "url": "https://files.pythonhosted.org/packages/11/9d/14f55632f292cc38a366c987a200eb4ebd7aa5a2a173fd81c3520cbd6826/pygwan-0.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72e38725b6eb5b17e60dbf42a308587bceacc0c7e504f817ae978c8f8bdc6faa",
                "md5": "350f7014c3e28e47c4fad1f52936de05",
                "sha256": "57a4de64f198b7927763924b01d0f796a7b5942f4ea0b9d5db4b8ec376a8a98d"
            },
            "downloads": -1,
            "filename": "pygwan-0.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "350f7014c3e28e47c4fad1f52936de05",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 15985,
            "upload_time": "2024-10-15T00:02:39",
            "upload_time_iso_8601": "2024-10-15T00:02:39.418956Z",
            "url": "https://files.pythonhosted.org/packages/72/e3/8725b6eb5b17e60dbf42a308587bceacc0c7e504f817ae978c8f8bdc6faa/pygwan-0.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-15 00:02:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lordskyzw",
    "github_project": "pygwan",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pygwan"
}
        
Elapsed time: 0.34380s