Skip to main content

WPP_Whatsapp aim of exporting functions from WhatsApp Web to the python, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination

Project description

WPP_Whatsapp

PyPI Version View

WPP_Whatsapp aim of exporting functions from WhatsApp Web to the python, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination
WPP_Whatsapp > WPPConnect Converted to python, so Documentation is same

Online channels

Telegram Group

Functions

Automatic QR Refresh
Send text, image, video, audio and docs
Get contacts, chats, groups, group members, Block List
Send contacts
Send stickers
Send stickers GIF
Multiple Sessions
Forward Messages
Receive message
insert user section
Send location
and much more

See more at WhatsApp methods

Getting Started

Installation

installed with pip:

pip install WPP_Whatsapp -U

Alternatively, you can grab the latest source code from GitHub:

pip install git+https://github.com/3mora2/WPP_Whatsapp

Send Text

from WPP_Whatsapp import Create

# start client with your session name
your_session_name = "test"
creator = Create(session=your_session_name)
client = creator.start()
# Now scan Whatsapp Qrcode in browser

# check state of login
if creator.state != 'CONNECTED':
    raise Exception(creator.state)

phone_number = "*********"  # or "+*********"
message = "hello from wpp"

# Simple message
result = client.sendText(phone_number, message)

Receive Messages(Auto Replay)

from WPP_Whatsapp import Create

# start client with your session name
your_session_name = "test"
creator = Create(session=your_session_name)
client = creator.start()
# Now scan Whatsapp Qrcode in browser

# check state of login
if creator.state != 'CONNECTED':
    raise Exception(creator.state)


def new_message(message):
    global client
    # Add your Code here
    if message and not message.get("isGroupMsg"):
        chat_id = message.get("from")
        message_id = message.get("id")
        if "السلام عليكم" in message.get("body"):
            client.reply(chat_id, "وعليكم السلام", message_id)
        else:
            client.reply(chat_id, "Welcome", message_id)


# Add Listen To New Message
creator.client.onMessage(new_message)

For More Examples

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

wpp_whatsapp-0.4.8.1.tar.gz (93.6 kB view details)

Uploaded Source

Built Distribution

WPP_Whatsapp-0.4.8.1-py3-none-any.whl (100.0 kB view details)

Uploaded Python 3

File details

Details for the file wpp_whatsapp-0.4.8.1.tar.gz.

File metadata

  • Download URL: wpp_whatsapp-0.4.8.1.tar.gz
  • Upload date:
  • Size: 93.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for wpp_whatsapp-0.4.8.1.tar.gz
Algorithm Hash digest
SHA256 71bdfa79c837cacb56bb414344b77b6c30b3079b39d1f5c8d53ff5533503497b
MD5 7f2de76c791c3aa3c7d288ce641ce06a
BLAKE2b-256 d6fab40ce65806b39573cbe393b09599d07fb6949d4979370cd8b124525e1358

See more details on using hashes here.

File details

Details for the file WPP_Whatsapp-0.4.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for WPP_Whatsapp-0.4.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd9924186d2f42dbfe4f85a0ac8e3929ad829d7c73eaf1f83af01a9cded6b262
MD5 0e6ae96f96feec85d5d3f5d3041b8def
BLAKE2b-256 d0345b793f133785f046d91d8d6e64233c0461ffd67022057076b88a1e71394e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page