@@ -81,6 +81,7 @@ def iterate(
8181 offset : int | None = None ,
8282 desc : bool | None = None ,
8383 sort_by : Literal ['createdAt' , 'stats.lastRunStartedAt' ] | None = 'createdAt' ,
84+ chunk_size : int | None = None ,
8485 timeout : Timeout = 'medium' ,
8586 ) -> Iterator [ActorListItem ]:
8687 """Iterate over the Actors the user has created or used.
@@ -96,6 +97,7 @@ def iterate(
9697 offset: What Actor to include as first when retrieving the list.
9798 desc: Whether to sort the Actors in descending order based on their creation date.
9899 sort_by: Field to sort the results by.
100+ chunk_size: Maximum number of Actors requested per API call when iterating across pages.
99101 timeout: Timeout for the API HTTP request.
100102
101103 Yields:
@@ -105,7 +107,7 @@ def iterate(
105107 def _callback (* , limit : int | None = None , offset : int | None = None ) -> ListOfActors :
106108 return self .list (my = my , limit = limit , offset = offset , desc = desc , sort_by = sort_by , timeout = timeout )
107109
108- return get_items_iterator (_callback , limit = limit , offset = offset )
110+ return get_items_iterator (_callback , limit = limit , offset = offset , chunk_size = chunk_size )
109111
110112 def create (
111113 self ,
@@ -273,6 +275,7 @@ def iterate(
273275 offset : int | None = None ,
274276 desc : bool | None = None ,
275277 sort_by : Literal ['createdAt' , 'stats.lastRunStartedAt' ] | None = 'createdAt' ,
278+ chunk_size : int | None = None ,
276279 timeout : Timeout = 'medium' ,
277280 ) -> AsyncIterator [ActorListItem ]:
278281 """Iterate over the Actors the user has created or used.
@@ -288,6 +291,7 @@ def iterate(
288291 offset: What Actor to include as first when retrieving the list.
289292 desc: Whether to sort the Actors in descending order based on their creation date.
290293 sort_by: Field to sort the results by.
294+ chunk_size: Maximum number of Actors requested per API call when iterating across pages.
291295 timeout: Timeout for the API HTTP request.
292296
293297 Yields:
@@ -297,7 +301,7 @@ def iterate(
297301 async def _callback (* , limit : int | None = None , offset : int | None = None ) -> ListOfActors :
298302 return await self .list (my = my , limit = limit , offset = offset , desc = desc , sort_by = sort_by , timeout = timeout )
299303
300- return get_items_iterator_async (_callback , limit = limit , offset = offset )
304+ return get_items_iterator_async (_callback , limit = limit , offset = offset , chunk_size = chunk_size )
301305
302306 async def create (
303307 self ,
0 commit comments