Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (4k points)
I wanted to know if it's possible in python language to read a CSV file directly from Azure blob storage as a stream and then process it in the code as required.

1 Answer

0 votes
by (9.6k points)
edited by

Azure Storage SDK for Python provides you with the possibility to do so. Check this code out to be able to connect with the Azure Blob storage:

from azure.storage.blob import BlockBlobService

block_blob_service = BlockBlobService(account_name='account name', account_key='accesskey')

block_blob_service.get_blob_to_path('containername', 'blobname', 'filename.txt')

You will have to import modules as such as 'azure.storage' for BlockBlobStorage from Azure Storage and 'azure'. 

Also, learn more about Azure, and become a master by enrolling in Intellipaat's Azure Certification!

Related questions

0 votes
1 answer
0 votes
1 answer
asked Feb 28, 2021 in Azure by angadmishra (6.5k points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...