learn-sql-model/client_sender.py
2023-06-08 09:02:43 -05:00

14 lines
269 B
Python

import time
from rich.console import Console
from websocket import create_connection
id = 1
url = f"ws://localhost:5000/ws/{id}"
Console().log(f"connecting to: {url}")
ws = create_connection(url)
data = []
while True:
ws.send("hello".encode())
time.sleep(1)