Skip to content

Creating, Fetching, Listing and Deleting from Azure Blob Storage

Notifications You must be signed in to change notification settings

joerivanarkel/AzureBlobStoragePython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzureBlobStoragePython

In this example I am using python and pipenv to work with Azure Blob Storage. I've used the azure-storage-blob, python-dotenv, pytest and pytest-dotenv.

Module

In the underlying code blocks, I create, list, download an delete blobs in a storage account. Blob client

blob_client.upload_blob(open(upload_file_path, "rb"))

Container client

blob_list = container_client.list_blobs()
for blob in blob_list:
  print(blob.name)

container client

download_file = open(download_file_path, "wb")
download_file.write(container_client.download_blob(local_file_name).readall())
container_client.delete_container()

os.remove(upload_file_path)
os.remove(download_file_path)
os.rmdir(local_path)

About

Creating, Fetching, Listing and Deleting from Azure Blob Storage

Topics

Resources

Stars

Watchers

Forks

Languages