{"id":24481,"library":"pywhatkit","title":"PyWhatKit","description":"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.","status":"active","version":"5.4","language":"python","source_language":"en","source_url":"https://github.com/Ankit404butfound/PyWhatKit","tags":["whatsapp","automation","web-scraping","pyautogui"],"install":[{"cmd":"pip install pywhatkit","lang":"bash","label":"PyPI install"},{"cmd":"pip install pywhatkit --upgrade","lang":"bash","label":"Upgrade"}],"dependencies":[{"reason":"Used for automating keyboard/mouse actions on WhatsApp Web.","package":"pyautogui","optional":false},{"reason":"Image processing for sending images.","package":"pillow","optional":false}],"imports":[{"note":"Directly importing functions may cause confusion; use module-level access.","wrong":"from pywhatkit import sendwhatmsg","symbol":"pywhatkit","correct":"import pywhatkit"}],"quickstart":{"code":"import pywhatkit as pwk\n\n# Send a WhatsApp message to a contact (include country code)\npwk.sendwhatmsg(\"+1234567890\", \"Hello from PyWhatKit!\", 15, 30)  # hour, minute (24-hour)\nprint(\"Message scheduled.\")","lang":"python","description":"Opens WhatsApp Web in a browser, waits until the given time, and sends a message."},"warnings":[{"fix":"Use numbers only, e.g., '911234567890' for India.","message":"Phone number must include country code without '+' (e.g., '1234567890' instead of '+1234567890'). Many users incorrectly include '+'.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure a graphical desktop environment is available. For headless, consider using a different library like twilio or selenium directly.","message":"The library opens a real browser window (Chrome) and simulates keystrokes. It will not work in headless environments or on servers without a display.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use the new parameters: pwk.sendwhats_image(phone_no, img_path, caption='')","message":"Version 5.0 changed the image sending API. Older code using sendwhats_image may fail if not updated.","severity":"breaking","affected_versions":"5.0+"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install pywhatkit","cause":"Library not installed in current Python environment.","error":"No module named 'pywhatkit'"},{"fix":"Update library and ensure import is correct: import pywhatkit; pywhatkit.sendwhatmsg(...)","cause":"Incorrect import or outdated library version.","error":"AttributeError: module 'pywhatkit' has no attribute 'sendwhatmsg'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}