WebSockets For Python Bindings 🔥
```py
@app.websocket('/ws')
def handle_websocket_connection(ws: WebSocket):
    if ws.id() == 2:
        ws.send_text("failure")
        ws.close()
    print(ws.state())
    print(ws.id())
    if ws.state() == 'open':  # connect/open/close/mismatch_protocol/handshake_error/error
        print(ws.receive_text())
        ws.send_json({"hello": "world"})
```