from zip_on_the_fly import ArchiveElement, ArchiveStream async def create_file(): # get content of the file from disk / via network or generate it yield b"next chunk" async def prepare_sources(): # ...