MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / __iter__

Method __iter__

tests/test_open_telemetry.py:5775–5777  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5773 class Dropped(httpx2.SyncByteStream):
5774 @override
5775 def __iter__(self) -> Iterator[bytes]:
5776 yield sse(cut_tool_stream_events())
5777 raise httpx2.ReadError("connection dropped")
5778
5779 headers = {"content-type": "text/event-stream", **RESPONSE_HEADERS}
5780 respx_mock.post("/v1/messages").mock(return_value=httpx2.Response(200, stream=Dropped(), headers=headers))

Callers

nothing calls this directly

Calls 2

cut_tool_stream_eventsFunction · 0.85
sseFunction · 0.70

Tested by

no test coverage detected