MCPcopy Index your code
hub / github.com/python-websockets/websockets / hello

Function hello

example/quick/client.py:5–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3from websockets.sync.client import connect
4
5def hello():
6 uri = "ws://localhost:8765"
7 with connect(uri) as websocket:
8 name = input("What's your name? ")
9
10 websocket.send(name)
11 print(f">>> {name}")
12
13 greeting = websocket.recv()
14 print(f"<<< {greeting}")
15
16if __name__ == "__main__":
17 hello()

Callers 1

client.pyFile · 0.70

Calls 3

connectFunction · 0.90
sendMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…