How to Scan an Azure Blob for Viruses in Python

pip install cloudmersive-virus-api-client
from __future__ import print_function
import time
import cloudmersive_virus_api_client
from import ApiException
from pprint import pprint
# Configure API key authorization: Apikey
configuration = cloudmersive_virus_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'
# create an instance of the API class
api_instance = cloudmersive_virus_api_client.ScanCloudStorageApi(cloudmersive_virus_api_client.ApiClient(configuration))
connection_string = 'connection_string_example' # str | Connection string for the Azure Blob Storage Account; you can get this connection string from the Access Keys tab of the Storage Account blade in the Azure Portal.
container_name = 'container_name_example' # str | Name of the Blob container within the Azure Blob Storage account
blob_path = 'blob_path_example' # str | Path to the blob within the container, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
# Scan an Azure Blob for viruses
api_response = api_instance.scan_cloud_storage_scan_azure_blob(connection_string, container_name, blob_path)
except ApiException as e:
print("Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_azure_blob: %s\n" % e)



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.