@@ -63,19 +63,33 @@ def delete(self) -> None:
63
63
"""
64
64
return self ._delete (timeout_secs = _SMALL_TIMEOUT )
65
65
66
- def list_keys (self , * , limit : int | None = None , exclusive_start_key : str | None = None ) -> dict :
66
+ def list_keys (
67
+ self ,
68
+ * ,
69
+ limit : int | None = None ,
70
+ exclusive_start_key : str | None = None ,
71
+ collection : str | None = None ,
72
+ prefix : str | None = None ,
73
+ ) -> dict :
67
74
"""List the keys in the key-value store.
68
75
69
76
https://docs.apify.com/api/v2#/reference/key-value-stores/key-collection/get-list-of-keys
70
77
71
78
Args:
72
79
limit: Number of keys to be returned. Maximum value is 1000.
73
80
exclusive_start_key: All keys up to this one (including) are skipped from the result.
81
+ collection: The name of the collection in store schema to list keys from.
82
+ prefix: The prefix of the keys to be listed.
74
83
75
84
Returns:
76
85
The list of keys in the key-value store matching the given arguments.
77
86
"""
78
- request_params = self ._params (limit = limit , exclusiveStartKey = exclusive_start_key )
87
+ request_params = self ._params (
88
+ limit = limit ,
89
+ exclusiveStartKey = exclusive_start_key ,
90
+ collection = collection ,
91
+ prefix = prefix ,
92
+ )
79
93
80
94
response = self .http_client .call (
81
95
url = self ._url ('keys' ),
@@ -292,19 +306,33 @@ async def delete(self) -> None:
292
306
"""
293
307
return await self ._delete (timeout_secs = _SMALL_TIMEOUT )
294
308
295
- async def list_keys (self , * , limit : int | None = None , exclusive_start_key : str | None = None ) -> dict :
309
+ async def list_keys (
310
+ self ,
311
+ * ,
312
+ limit : int | None = None ,
313
+ exclusive_start_key : str | None = None ,
314
+ collection : str | None = None ,
315
+ prefix : str | None = None ,
316
+ ) -> dict :
296
317
"""List the keys in the key-value store.
297
318
298
319
https://docs.apify.com/api/v2#/reference/key-value-stores/key-collection/get-list-of-keys
299
320
300
321
Args:
301
322
limit: Number of keys to be returned. Maximum value is 1000.
302
323
exclusive_start_key: All keys up to this one (including) are skipped from the result.
324
+ collection: The name of the collection in store schema to list keys from.
325
+ prefix: The prefix of the keys to be listed.
303
326
304
327
Returns:
305
328
The list of keys in the key-value store matching the given arguments.
306
329
"""
307
- request_params = self ._params (limit = limit , exclusiveStartKey = exclusive_start_key )
330
+ request_params = self ._params (
331
+ limit = limit ,
332
+ exclusiveStartKey = exclusive_start_key ,
333
+ collection = collection ,
334
+ prefix = prefix ,
335
+ )
308
336
309
337
response = await self .http_client .call (
310
338
url = self ._url ('keys' ),
0 commit comments