-
tensorstore.KvStore.list(self, range: KvStore.KeyRange | None =
None, strip_prefix_length: int =0) Future[list[bytes]] Lists the keys in the key-value store.
Example
>>> store = ts.KvStore.open({'driver': 'memory'}).result() >>> store[b'a'] = b'value' >>> store[b'b'] = b'value' >>> store.list().result() [b'a', b'b'] >>> store.list(ts.KvStore.KeyRange(inclusive_min=b'b')).result() [b'b']- Parameters:¶
- range: KvStore.KeyRange | None =
None¶ If specified, restricts to the specified key range.
- strip_prefix_length: int =
0¶ Strips the specified number of bytes from the start of the returned keys.
- range: KvStore.KeyRange | None =
- Returns:¶
Future that resolves to the list of matching keys, in an unspecified order.
- Raises:¶
ValueError – If a
transactionis specified.