Search code examples
azure-machine-learning-service

Connect to data hosted on Azure Storage account from VS code


I am trying to connect to my data hosted on Azure Storage account from VS code in python and facing the issue while connecting.

Need the sample code to connect to the blob storage.


Solution

  • account_url = "https://<storageaccountname>.blob.core.windows.net"
    default_credential = DefaultAzureCredential()
    
    # Create the BlobServiceClient object
    blob_service_client = BlobServiceClient(account_url, credential=default_credential)
    

    Here is the document for connecting the Azure Blob Storage client library for Python to manage blobs and containers. Follow these steps to install the package and try out example code for basic tasks in an interactive console app.