Blob objects returned by list_blobs has None metadata properties
See original GitHub issueazure-storage==0.32.0 Python 3.4.3 requests==2.10.0
If You use:
from azure.storage import CloudStorageAccount
ACC = CloudStorageAccount(account_name, account_key)
SRV = ACC.create_block_blob_service()
GEN = SRV.list_blobs(container_name)
for blob in GEN:
print(blob.metadata)
to get list of blobs in container and their metadata, You will have:
None None None etc…
But if You use:
blob0 = SRV.get_blob_properties(container_name, blob_name)
print(blob0)
Everything is OK:
{‘val1’: ‘foo’, ‘val2’: ‘blah’}
In both cases we have azure.storage.blob.models.Blob object so there should be ‘metadata’ property as in Model.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Manage blob properties and metadata with JavaScript
Learn how to set and retrieve system properties and store custom metadata on blobs in your Azure Storage account using the JavaScript client ......
Read more >Accessing metadata from azure storage blob - Stack Overflow
The blob objects in blobs, show 0 for the metadata count. Each of the items HAVE metadata, verified by looking at the properties...
Read more >Azure Blob Storage binding spec - Dapr Docs
The response body contains the value stored in the blob object. If enabled, the user defined metadata will be returned as HTTP headers...
Read more >azure.storage.blob package - NET
create_container (name: str, metadata: Optional[Dict[str, str]] = None, ... Returns. An object containing blob service properties such as analytics logging, ...
Read more >Azure Storage SDK for Go (Preview) - Go Packages
Properties or metadata in blob. ... ListBlobs returns an object that contains list of blobs in the container, pagination token and other information...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @smereczynski,
List blobs by default does not return metadata unless you specify “Metadata” in the “include” parameter when calling the method. Have you tried adding this parameter to your calls?
@erezvani1529 OK. Of course it works. Is there any plan to create some reliable documentation for Python SDK?