Continue of previous task.
from azure.storage.blob import BlockBlobService, ContentSettings, PublicAccess
BlockBlobService(
account_name=cluster_config["config"]["AZURE_STORAGE_ACCOUNT"],
account_key=cluster_config["config"]["AZURE_STORAGE_KEY"],
)
storage.create_container(container_name, public_access=PublicAccess.Blob)
storage.create_blob_from_bytes(
container_name, blob_name, content, content_settings=ContentSettings(content_type=content_type)
block_blob_service.create_blob_from_stream(
folder_name, filename, content, content_settings=ContentSettings(content_type=mimetype)
)
from azure.storage.blob import ContainerClient, ContentSettings, PublicAccess
account_name = cluster_config["config"]["AZURE_STORAGE_ACCOUNT"]
account_key = cluster_config["config"]["AZURE_STORAGE_KEY"]
account_url = f"https://{account_name}.blob.core.windows.net"
container_clients.append(
ContainerClient(account_url=account_url, credential=account_key, container_name=container_name)
if not container_client.exists():
container_client.create_container(public_access=PublicAccess.Blob) # exception, or overwrite true
container_client.get_blob_client(blob_name).upload_blob(
content, content_settings=ContentSettings(content_type=content_type) , overwrite=Tru