Skip to main content

x-whatsapp

x-whatsapp by x-cortex is a python library for automating WhatsApp interactions. It uses playwright to automate tasks such as sending messages, fetching chat history, and listening for new messages on WhatsApp Web.

Usage

Initializing the Client

from x_whatsapp import WhatsappClient

# Initialize the client with debugging enabled
client = WhatsappClient(DEBUG=True)
# Initialize Playwright and launch the browser
await client.initialize_playwright()
# Log in to WhatsApp
await client.login()

Sending a Message

await client.send_message("contact_name", "Hello from x-whatsapp!")

Fetching Chat History

await client.open_chat_panel("contact_name")
messages = await client.extract_messages()
for message in messages:
    print(message)

Logging Out

await client.logout()

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for x-whatsapp 0.1.2

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

Source distribution (sdist)

Source distribution for x-whatsapp 0.1.2
File Size Uploaded Provenance Actions
x_whatsapp-0.1.2.tar.gz 11.0 kB Without provenance Details for x_whatsapp-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for x-whatsapp 0.1.2
File Interpreter ABI Platform Actions
x_whatsapp-0.1.2-py3-none-any.whl Python 3 none any Details for x_whatsapp-0.1.2-py3-none-any.whl

Total release size: 20.4 kB

Release files / x_whatsapp-0.1.2.tar.gz

Download URL x_whatsapp-0.1.2.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ba765b6a94440efec5236be588bb052e69c0845500872baf3638f8d016624ead
BLAKE2b-256 checksum
How to use checksums
6b3c29ca07daef69109d8b00f4b114082115f1e398da667f17c071898334183b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release files / x_whatsapp-0.1.2-py3-none-any.whl

Download URL x_whatsapp-0.1.2-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d99205476ebcce553d7831a03866254814241026b61704c7187d08205e4d154
BLAKE2b-256 checksum
How to use checksums
28d3eae90295e4a12bbde65c5a8129bdb094952089d081977c923f94efcabe36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Security for x-whatsapp 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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