WhatsApp Web Python Library
O bibliotecă Python pură pentru comunicarea cu WhatsApp Web, cu suport complet pentru criptarea Signal Protocol.
Caracteristici
- Autentificare prin cod QR
- Autentificare prin cod de asociere (pairing code)
- Conexiune WebSocket la serverele WhatsApp Web
- Criptare completă Signal Protocol (Double Ratchet, X3DH)
- Suport pentru parsarea/serializarea Protobuf binară
- Trimiterea/primirea de mesaje text
- Arhitectură bazată pe evenimente pentru evenimente în timp real
Instalare
pip install whatsapp-web-py
Exemplu rapid
import asyncio
from whatsapp import WAClient, WAEventType
async def on_message_received(message_data):
print(f"Mesaj nou primit: {message_data}")
async def on_qr_code_received(qr_data):
print(f"Scanează acest cod QR cu WhatsApp: {qr_data}")
async def main():
# Creează clientul
client = WAClient(session_path="./whatsapp_session")
# Configurează handlerii de evenimente
client.set_qr_callback(on_qr_code_received)
client.on(WAEventType.MESSAGE, on_message_received)
# Conectează
await client.connect()
# Așteaptă autentificarea
while not client.authenticated:
await asyncio.sleep(1)
# Trimite un mesaj
await client.send_message("+1234567890", "Salut de la WhatsApp Web Python!")
# Menține rularea
await asyncio.sleep(3600)
if __name__ == "__main__":
asyncio.run(main())
Licență
MIT License
Autor
gyovannyvpn123
Metadata
Release files for whatsapp-web-py 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| whatsapp_web_py-0.1.0.tar.gz | 18.7 kB | Without provenance | Details for whatsapp_web_py-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| whatsapp_web_py-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for whatsapp_web_py-0.1.0-py3-none-any.whl |
Total release size: 34.1 kB
Release files / whatsapp_web_py-0.1.0.tar.gz
| Download URL | whatsapp_web_py-0.1.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d988b9eae57b2c981bf578599d2267850f3b91731a69bf68c5b994a093c6764a
|
|
BLAKE2b-256 checksum How to use checksums |
b554b9cefa430b5f64daa42417b087e7f812cc89ffcb934cb70f237fdeb3bd43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / whatsapp_web_py-0.1.0-py3-none-any.whl
| Download URL | whatsapp_web_py-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0ce45c5f262f28c4a0c0612c1ccf1d5277f90f4b6c7c03257e1a2d58cec21ed
|
|
BLAKE2b-256 checksum How to use checksums |
3c745352904917ea999b0451c43e7c362eb759999620b10af797b8000843d96e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for whatsapp-web-py 0.1.0
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.