Open source Python wrapper for the WhatsApp Cloud API
Project description
whatsapp-python
Free, open-source Python wrapper for the WhatsApp Cloud API.
Forked from Neurotech-HQ/heyoo
Supported features
- Listening to events (messages, media, etc.)
- Sending messages
- Marking messages as read
- Sending Media (images, audio, video and documents)
- Sending location
- Sending interactive buttons
- Sending template messages
- Parsing messages and media received
App events
Asynchronous app events are now available!
The docs are available in the wiki
Leave feedbacks/report issues freely on GitHub! I'll be glad to help you!
Installation
To install the library you can either use pip (latest release version):
pip install whatsapp-python
or git (latest development version):
git clone https://github.com/filipporomani/whatsapp.git
cd whatsapp
python3 setup.py install
Documentation
The documentation for the library is available under the wiki section on GitHub.
Costs of the API
While using third-party API providers of the WhatsApp API may have some monthly fees, using the WhatsApp API provided directly by Facebook is way cheaper, even if the billing docs are pretty hard to understand. The first 1000 chats created are free, then there is a pay-as-you-go fee that is paid for each conversation started.
IMPORTANT: it is now mandatory (at least it was for me) to add a credit card to the whatsapp account to use the service. I eventually got billed for using a non-test number (~1,20€), so be carefull using the API!
All the prices are available in the WhatsApp API docs
Switching from Neurotech-HQ/heyoo
Any version >1.1.2 is incompatible with the original heyoo
library! Be careful updating! Read the docs first!
Any version <=1.1.2 is fully compatible with the original heyoo
library and doesn't include any breaking change..
You can ignore this warning if it's your first time using the library.
Switching from heyoo to whatsapp-python doesn't require any change for versions up to 1.1.2: just uninstall heyoo
, install whatsapp-python==1.1.2
and change the import name from heyoo
to whatsapp
.
For version which are GREATER THEN 1.1.2, messages have became objects, so you need to change your code to use the new methods.
Note: docs for version 1.1.2 are available in the dedicated wiki page.
Issues
If you are facing any issues or have any questions, please open an issue on the GitHub repository
Contributing
This is an opensource project published under the MIT License
: LICENSE.
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file whatsapp-python-3.0.2.tar.gz
.
File metadata
- Download URL: whatsapp-python-3.0.2.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e40edc062956cbd7a8b78816731ad6afbe0dbaa939d7ad750f592868e3b58537 |
|
MD5 | baad915f67b380e0e683f4829a8786a7 |
|
BLAKE2b-256 | 58f718a4db2b475962f8e1138926114a31670467b3578f22c6c5a78369afc0c2 |