cognee/cognee/tests/integration/documents/async_gen_zip.py
Boris 46c4463cb2
feat: s3 storage (#988)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.

---------

Co-authored-by: vasilije <vas.markovic@gmail.com>
Co-authored-by: Vasilije <8619304+Vasilije1990@users.noreply.github.com>
2025-07-14 21:47:08 +02:00

12 lines
317 B
Python

async def async_gen_zip(iterable1, async_iterable2):
it1 = iter(iterable1)
it2 = async_iterable2.__aiter__()
while True:
try:
val1 = next(it1)
val2 = await it2.__anext__()
yield val1, val2
except (StopIteration, StopAsyncIteration):
break