Serialize one event payload as an SSE frame (its `type` is the event name).
(data: dict[str, Any])
| 107 | |
| 108 | |
| 109 | def ev(data: dict[str, Any]) -> str: |
| 110 | """Serialize one event payload as an SSE frame (its `type` is the event name).""" |
| 111 | return f"event: {data['type']}\ndata: {json.dumps(data)}\n\n" |
| 112 | |
| 113 | |
| 114 | def message_start() -> str: |
no outgoing calls
no test coverage detected