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 is WPPConnect Converted to python, so Documentation is same

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

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.5.6.tar.gz (95.2 kB view details)

Uploaded Source

Built Distribution

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

wpp_whatsapp-0.5.6-py3-none-any.whl (101.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wpp_whatsapp-0.5.6.tar.gz
  • Upload date:
  • Size: 95.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for wpp_whatsapp-0.5.6.tar.gz
Algorithm Hash digest
SHA256 b9828522d6772043dc7d1eb167c30baed945c3b6c966b2c2962febb12dc8c13c
MD5 853663ffeb1e0875cd3ce65e1780b244
BLAKE2b-256 c7bb4ad29d194f1c150b7ddaa26b68a0eb2c7ad409a00fb3c5d4524eb70c1c8e

See more details on using hashes here.

File details

Details for the file wpp_whatsapp-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: wpp_whatsapp-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 101.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for wpp_whatsapp-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5b60ba11076aeb08cdadad13887eea670af5d42161a44bfa7fb4d9f6ffa49cfe
MD5 f2410bd95488668dcfa50881bedddb93
BLAKE2b-256 7bbad5ffc7a5d593e720b6481c46e4f3503b13fe7af674372913f7f7ff0fa48c

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