def auth_shared_key(self): # [START create_blob_service_client] from azure.storage.blob import BlobServiceClient blob_service_client = BlobServiceClient(account_url=self.url, credential=self.shared_access_key) # [END create_blob_service_client] # Get account information for the Blob Service account_info = blob_service_client.get_account_information()
config_source = "./infofab-sapforsales-config.json" with open(config_source, encoding='utf-8') as f: config = json.load(f) storage_name = config['storage_name'] storage_key = config['storage_key1'] storage_string = config['storage_connection_string1'] storage_url = f"https://{storage_name}.blob.core.windows.net/" blob_service_client = BlobServiceClient( account_url=storage_url, credential=storage_key ) account_info = blob_service_client.get_account_information() container_name = config['container_name'] container_client = ContainerClient( account_url=storage_url, container_name=container_name, credential=storage_key ) print(dir(container_client)) #print(dir(blob_client)) blob_list = container_client.list_blobs() for blob in blob_list: print("\t" + blob.name)