Skip to content

Commit

Permalink
add iter_keys_upto_delimiter fastpath for azure store
Browse files Browse the repository at this point in the history
  • Loading branch information
crepererum committed Jun 17, 2019
1 parent 88b5a2d commit 9063f74
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions simplekv/net/azurestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ def iter_keys(self, prefix=u""):
return (blob.decode('utf-8') if isinstance(blob, binary_type)
else blob for blob in blobs)

def iter_keys_upto_delimiter(self, delimiter, prefix=u""):
if prefix == "":
prefix = None
with map_azure_exceptions():
blobs = self.block_blob_service.list_blob_names(self.container, prefix=prefix, delimiter=delimiter)
return (blob.decode('utf-8') if isinstance(blob, binary_type)
else blob for blob in blobs)

def _open(self, key):
with map_azure_exceptions(key=key):
return IOInterface(self.block_blob_service, self.container, key, self.max_connections)
Expand Down

0 comments on commit 9063f74

Please sign in to comment.