-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
According to this
maxResults
should be:
Maximum combined number of entries in items[] and prefixes[] to return in a single page of responses. Because duplicate entries in prefixes[] are omitted, fewer total results may be returned than requested. The service uses this parameter or 1,000 items, whichever is smaller.
When I do this:
client = storage.Client()
bucket = storage.Bucket(client, "<bucket_name>")
blobs_iterator = client.list_blobs(bucket, max_results=10)
for page in blobs_iterator.pages:
print(page.num_items)
Output:
10
Only one iteration of the loop is completed even though there are 100 blobs in the bucket. It seems the max_results
argument is limiting the total results rather than per page results.
Related to #19
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.