How to use the aiofile.Reader function in aiofile

To help you get started, we’ve selected a few aiofile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github YoRyan / sia-slice / tests / test_read.py View on Github external
async def setUp(self):
            await self.afp.open()
            reader = aiofile.Reader(self.afp, chunk_size=self.block_size)
            self.blocks = [ss.Block(md5_hash=md5(chunk).hexdigest(),
                                          compressed_bytes=lzma.compress(chunk))
                           async for chunk in reader]