MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / _Reader

Class _Reader

asyncpg/connection.py:1265–1274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1263 if f is not None:
1264 # Copying from a file-like object.
1265 class _Reader:
1266 def __aiter__(self):
1267 return self
1268
1269 async def __anext__(self):
1270 data = await run_in_executor(None, f.read, 524288)
1271 if len(data) == 0:
1272 raise StopAsyncIteration
1273 else:
1274 return data
1275
1276 reader = _Reader()
1277

Callers 1

_copy_inMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected