Registry / communication / pywhatkit

pywhatkit

JSON →
library5.4pypypi✓ verified 86d ago

PyWhatKit is a Python library for automating WhatsApp Web, including sending messages, images, and performing searches. It relies on a web browser to open WhatsApp Web and simulate user actions. Current version is 5.4, with maintenance-focused releases.

pip install pywhatkit
INSTALL
IMPORT
SIG · PYWHATKIT
P
pywhatkit
communicationpythonv5.4
Install
12.2s avg
Import
Disk
49MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 50.1MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 12.2s · import 0.000s · 51MB
49MB installed
● package 49MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pywhatkit
import pywhatkit
from pywhatkit import sendwhatmsg
Directly importing functions may cause confusion; use module-level access.

Opens WhatsApp Web in a browser, waits until the given time, and sends a message.

import pywhatkit as pwk # Send a WhatsApp message to a contact (include country code) pwk.sendwhatmsg("+1234567890", "Hello from PyWhatKit!", 15, 30) # hour, minute (24-hour) print("Message scheduled.")
Debug
Known issues
gotchaPhone number must include country code without '+' (e.g., '1234567890' instead of '+1234567890'). Many users incorrectly include '+'.
fix
Use numbers only, e.g., '911234567890' for India.
affects: All versions
gotchaThe library opens a real browser window (Chrome) and simulates keystrokes. It will not work in headless environments or on servers without a display.
fix
Ensure a graphical desktop environment is available. For headless, consider using a different library like twilio or selenium directly.
affects: All versions
breakingVersion 5.0 changed the image sending API. Older code using sendwhats_image may fail if not updated.
fix
Use the new parameters: pwk.sendwhats_image(phone_no, img_path, caption='')
affects: 5.0+
Errors
Common errors & fixes
No module named 'pywhatkit'
Library not installed in current Python environment.
fix
Run: pip install pywhatkit
AttributeError: module 'pywhatkit' has no attribute 'sendwhatmsg'
Incorrect import or outdated library version.
fix
Update library and ensure import is correct: import pywhatkit; pywhatkit.sendwhatmsg(...)
Upgrade
Version history
5.4latest on PyPI · released Jun 27, 2022
Audit
Dependencies
pyautoguirequiredUsed for automating keyboard/mouse actions on WhatsApp Web.
pillowrequiredImage processing for sending images.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
pywhatkit — pip install pywhatkit · libregistry