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

Method aiter_bytes

src/anthropic/_streaming.py:531–533  ·  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

529 ...
530
531 def aiter_bytes(self, iterator: AsyncIterator[bytes]) -> AsyncIterator[ServerSentEvent]:
532 """Given an async iterator that yields raw binary data, iterate over it & yield every event encountered"""
533 ...
534
535
536def 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