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

Method aiter_bytes

src/anthropic/_streaming.py:410–412  ·  view source on GitHub ↗

Given an async iterator that yields raw binary data, iterate over it & yield every event encountered

(self, iterator: AsyncIterator[bytes])

Source from the content-addressed store, hash-verified

408 ...
409
410 def aiter_bytes(self, iterator: AsyncIterator[bytes]) -> AsyncIterator[ServerSentEvent]:
411 """Given an async iterator that yields raw binary data, iterate over it & yield every event encountered"""
412 ...
413
414
415def is_stream_class_type(typ: type) -> TypeGuard[type[Stream[object]] | type[AsyncStream[object]]]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected