pythonparsingvisual-studio-codeazure-blob-storageshared-access-signatures

How to work with the blob error in VsCode


enter image description hereThe Error is as shown in the image

enter image description here


Solution

  • I followed the below Steps to download the file from the blob storage to local path

    enter image description here

    enter image description here

    enter image description here

    
    from fileinput import filename
    from azure.storage.blob import BlobServiceClient
    from azure.storage.blob import BlobClient
    
    
    blob_url = "your blob url"
    file_name = "hello2.log"
    
    blob_client= BlobClient.from_blob_url(blob_url)
    with open(file_name, "wb") as my_blob:
        download_stream= blob_client.download_blob()   
        my_blob.write(download_stream.readall())
    
    
    

    enter image description here