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

Basic FunctionDocumentation

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 = "201016708170"  # or "+201016708170"
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.1.6.1.tar.gz (59.1 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.1.6.1-py3-none-any.whl (65.2 kB view details)

Uploaded Python 3

File details

Details for the file WPP_Whatsapp-0.1.6.1.tar.gz.

File metadata

  • Download URL: WPP_Whatsapp-0.1.6.1.tar.gz
  • Upload date:
  • Size: 59.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for WPP_Whatsapp-0.1.6.1.tar.gz
Algorithm Hash digest
SHA256 7afb51c5dab5758a96a21d6811dcdc6fd932e1785e6c481feddefa784c1b9c84
MD5 ce79014c250482d40989ad4102df304a
BLAKE2b-256 6c8d263d46cd39b8b0bf0a43b1c79056f85d7746022691eb67e9d203aa5d4384

See more details on using hashes here.

File details

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

File metadata

  • Download URL: WPP_Whatsapp-0.1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 65.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for WPP_Whatsapp-0.1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc61b35068fa5379a240c351e44ce66f69ed21cd4112eeec0b56ff976fa583c7
MD5 38e1cf29875db34f16cdf67270479dea
BLAKE2b-256 ab05155958ba4bd6d94e12f6ba090df8cbac586acef40f99663f539d56c48164

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