Connect to data hosted on Azure Storage account from VS code

Connect to data hosted on Azure Storage account from VS code

Problem Description:

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 – 1

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.

Rate this post
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Reject