Debian Codegraph @

docs/examples/websockets/sending_json_dict.py

raw
1 from typing import Dict
2
3 from litestar import Litestar, websocket_listener
4
5
6 @websocket_listener("/")
7 async def handler(data: str) -> Dict[str, str]:
8 return {"message": data}
9
10
11 app = Litestar([handler])