I am trying to download data from an Azure Storage Account using azure-storage-blob's BlobServiceClient
class.
When I run this snippet from a Jupyter notebook, I manage to retrieve the data without any problem:
from azure.storage.blob import BlobServiceClient
blob_service_client = BlobServiceClient.from_connection_string(CONNECTION_STRING)
blob_client = blob_service_client.get_blob_client(path, 'processed.csv')
CONNECTION_STRING
is the connection string to my Azure Storage Account and path
, the path to the processed.csv
data onto this Storage Account.
However, when running the same script from within a fastAPI application deployed onto Azure App Services, I cannot manage to instantiate BlobServiceClient
. Under the Jupyter notebook, print(blob_service_client)
returns a BlobServiceClient object, under Azure App Services it returns null.
I am using azure-storage-blob==12.13.1
, which is specified in my requirements.txt.