MCPcopy Index your code
hub / github.com/faust-streaming/faust / items

Method items

faust/streams.py:279–291  ·  view source on GitHub ↗

Iterate over the stream as ``key, value`` pairs. Examples: .. sourcecode:: python @app.agent(topic) async def mytask(stream): async for key, value in stream.items(): print(key, value)

(self)

Source from the content-addressed store, hash-verified

277 return new_stream
278
279 async def items(self) -> AsyncIterator[Tuple[K, T_co]]:
280 """Iterate over the stream as ``key, value`` pairs.
281
282 Examples:
283 .. sourcecode:: python
284
285 @app.agent(topic)
286 async def mytask(stream):
287 async for key, value in stream.items():
288 print(key, value)
289 """
290 async for event in self.events():
291 yield event.key, cast(T_co, event.value)
292
293 async def events(self) -> AsyncIterable[EventT]:
294 """Iterate over the stream as events exclusively.

Callers 15

setup.pyFile · 0.45
setting_metadataMethod · 0.45
renderFunction · 0.45
_value_or_mockMethod · 0.45
test_constructorMethod · 0.45
test_constructorMethod · 0.45
test_constructorMethod · 0.45
_setup_keysMethod · 0.45
_setup_itemsMethod · 0.45
seMethod · 0.45
dataMethod · 0.45

Calls 1

eventsMethod · 0.95

Tested by 15

_value_or_mockMethod · 0.36
test_constructorMethod · 0.36
test_constructorMethod · 0.36
test_constructorMethod · 0.36
_setup_keysMethod · 0.36
_setup_itemsMethod · 0.36
seMethod · 0.36
dataMethod · 0.36
data_with_30s_deltaMethod · 0.36
remove_a_keyMethod · 0.36
test_items_nowMethod · 0.36