Skip to main content

pyWAppSel

image image

pyWAppSel is a Python library with various helpful features. It's easy-to-use and does not require you to do any additional setup.

Whatsapp

Package pysashapy/pyWAppSel implements the WhatsApp Web API to provide a clean interface for developers. The official WhatsApp Business API was released in August 2018. You can check it out here.

Installation and Supported Versions

pyWAppSel is available on PyPi:

pip install pyWAppSel

pyWAppSel officially supports Python 3.8+.

Cloning the Repository

git clone https://github.com/pysashapy/pyWAppSel.git
pip install selenium webdriver_manager

Features

  • Sending Message to a WhatsApp Group or Contact
  • Sending Image/Video/Document/Sticker/ to a WhatsApp Group or Contact
  • Downloading Videos/Photos/Sticker/Voice Message from Group and Contact
  • Listening to one or all Group or Contact
  • get a qr code link for authorization from the console
  • Install and Use

Usage

Quick Start

from pyWAppSel.types import FileTypes
from pyWAppSel.Client import WhatsApp, Messenger

# start selenium and auth
client = WhatsApp(path_download='full path to downloaded files')

# auth
if not client.isLogin(wait_time=100):
    client.login()

# open chat, get names chats, get first chat
messenger = Messenger(client=client)


# if the "chat name" is incomplete then the first chat in the search will be selected
chat = messenger.openChat(name='CHAT NAME')

# send text message
chat.sendText(text='Hello, world!')
# send photo
chat.sendFile(path_file='data/test.jpg', type_attachment=FileTypes.PHOTO_VIDEO)
# send video
chat.sendFile(path_file='data/test.mp4', type_attachment=FileTypes.PHOTO_VIDEO)
# send document
chat.sendFile(path_file='data/test.jpg', type_attachment=FileTypes.DOCUMENT)
# send sticker
chat.sendFile(path_file='data/test.jpg', type_attachment=FileTypes.STICKER)

# returns a sheet with the name of the chats that have been added to the number book
names_chats = messenger.getChatsFromBook()
print(names_chats)

# returns a list with the names of all chats
names_all_chats = messenger.getAllChats()
print(names_all_chats)

# close WebDriver
client.close()

For more Examples and Functions, have a look at the Example.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk.

License

Apache Software License (Apache 2.0). For more information see this

NOTICE this

Metadata

Release files for pyWAppSel 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyWAppSel 1.0.5
File Size Uploaded
pyWAppSel-1.0.5.tar.gz 13.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyWAppSel 1.0.5
File Interpreter ABI Platform
pyWAppSel-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 26.6 kB

Release files / pyWAppSel-1.0.5.tar.gz

Download URL pyWAppSel-1.0.5.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ce8f8dd1b8adfbe7e7e059a94f443986159f7619b8a4f457b97bf93900b67f16
BLAKE2b-256 checksum
How to use checksums
1dbb8d9c11bdf57a4623254a2fcc6b863e81d68687aca5e8f4d000ed0c2e9e0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.0

Release files / pyWAppSel-1.0.5-py3-none-any.whl

Download URL pyWAppSel-1.0.5-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f1037411b7d2548fe8729a1923d1b5737b27092b71db7febb53e9f59a57325a
BLAKE2b-256 checksum
How to use checksums
5a32af8f43d3959c7412b58c464ab80a123168fcfdd15cc8204cc3f508cc2d6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.0

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

1 release file

1.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page