New num_results maximum for list_blobs?
Hello,
I am calling the list_blobs function on a container with more than 84k blobs. The documentation states that the server will only return up to 5000 (reference), but the function is returning the results of all 84k blobs.
Has there been an update to increase the max number of results returned?
Example code:
blob_list = blob_service.list_blobs('container-name')
results = [blob for blob in blob_list]
len(results) # Will be 84k in size
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage
Thanks for reporting this. @xiafu-msft and @zezha-msft thoughts?
Hi @JustinChavez,
Thanks for reaching out! It seems you are looking at the doc for old azure-storage-blob Here a place as reference https://azuresdkdocsdev.blob.core.windows.net/$web/python/azure-storage-blob/12.0.0b4/azure.storage.blob.html#module-azure.storage.blob.blob_client for the package you are using
However, the I think the doc is not accurate either... it doesn't say anything about the number of blobs that list_blobs will return.
If you only want to get specific number of blobs each time, you can specify results_per_page parameter like this:
iterator_for_a_page = blob_service.list_blobss(results_per_page=2).by_page()
then you can get list of blobs:
blobs = list(next(iterator_for_a_page))
Hope that could help. Sorry about the inconvenience.
@xiafu-msft's response is correct. Feel free to reopen if you have additional concerns.
Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment.