Yield machine pages (cursor pagination).
(
self, *, presence: str = "any", q: str | None = None, limit: int = 100
)
| 87 | yield item |
| 88 | |
| 89 | async def pages( |
| 90 | self, *, presence: str = "any", q: str | None = None, limit: int = 100 |
| 91 | ) -> AsyncIterator[MachineList]: |
| 92 | """Yield machine pages (cursor pagination).""" |
| 93 | |
| 94 | async def fetch(cursor: str | None) -> MachineList: |
| 95 | return await self.list(presence=presence, q=q, limit=limit, cursor=cursor) |
| 96 | |
| 97 | async for page in self._paginate_cursor(fetch): |
| 98 | yield page |
| 99 | |
| 100 | # -- stream ------------------------------------------------------------ |
| 101 |