Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/open-wa/wa-automate-socket-client-python
🔌 🛠The wa-automate socket client allows you to easily connect to remote EASY API instances. Be sure to 🌟 this repository for updates!
https://github.com/open-wa/wa-automate-socket-client-python
open-wa python socket-io whatsapp-api
Last synced: about 1 month ago
JSON representation
🔌 🛠The wa-automate socket client allows you to easily connect to remote EASY API instances. Be sure to 🌟 this repository for updates!
- Host: GitHub
- URL: https://github.com/open-wa/wa-automate-socket-client-python
- Owner: open-wa
- License: other
- Created: 2022-03-16T15:46:23.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-13T17:06:17.000Z (about 2 years ago)
- Last Synced: 2024-08-02T13:28:18.430Z (5 months ago)
- Topics: open-wa, python, socket-io, whatsapp-api
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 84
- Watchers: 6
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Remote Socket Client
## How to:
1. Run the EASY API. Note: `--socket` flag is required!!
```bash
> npx @open-wa/wa-automate --socket -p 8085 -k secure_api_key# OR use docker
> docker run openwa/wa-automate --socket -p 8085 -k secure_api_key
```2. Install
```bash
> pip install wa-automate-socket-client
```3. Sample code:
```python
from wa_automate_socket_client import SocketClientNUMBER = '[email protected]'
client = SocketClient('http://localhost:8085/', 'secure_api_key')
def printResponse(message):
print(message)# Listening for events
client.onMessage(printResponse)# Executing commands
client.sendText(NUMBER, "this is a text")# Sync/Async support
print(client.getHostNumber()) # Sync request
client.sendAudio(NUMBER,
"https://download.samplelib.com/mp3/sample-3s.mp3",
sync=False,
callback=printResponse) # Async request. Callback is optional# Finally disconnect
client.disconnect()
```