File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1054,6 +1054,15 @@ def list_blobs(
1054
1054
:rtype: :class:`~google.api_core.page_iterator.Iterator`
1055
1055
:returns: Iterator of all :class:`~google.cloud.storage.blob.Blob`
1056
1056
in this bucket matching the arguments.
1057
+
1058
+ Example:
1059
+ List blobs in the bucket with user_project.
1060
+
1061
+ >>> from google.cloud import storage
1062
+ >>> client = storage.Client()
1063
+
1064
+ >>> bucket = storage.Bucket("my-bucket-name", user_project='my-project')
1065
+ >>> all_blobs = list(bucket.list_blobs())
1057
1066
"""
1058
1067
extra_params = {"projection" : projection }
1059
1068
Original file line number Diff line number Diff line change @@ -657,6 +657,15 @@ def list_blobs(
657
657
Returns:
658
658
Iterator of all :class:`~google.cloud.storage.blob.Blob`
659
659
in this bucket matching the arguments.
660
+
661
+ Example:
662
+ List blobs in the bucket with user_project.
663
+
664
+ >>> from google.cloud import storage
665
+ >>> client = storage.Client()
666
+
667
+ >>> bucket = storage.Bucket("my-bucket-name", user_project='my-project')
668
+ >>> all_blobs = list(client.list_blobs(bucket))
660
669
"""
661
670
bucket = self ._bucket_arg_to_bucket (bucket_or_name )
662
671
return bucket .list_blobs (
You can’t perform that action at this time.
0 commit comments