How to virus scan a DMG archive in Python

pip install cloudmersive-virus-api-client
from __future__ import print_functionimport timeimport cloudmersive_virus_api_clientfrom cloudmersive_virus_api_client.rest import ApiExceptionfrom pprint import pprint# Configure API key authorization: Apikeyconfiguration = cloudmersive_virus_api_client.Configuration()configuration.api_key['Apikey'] = 'YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['Apikey'] = 'Bearer'# create an instance of the API classapi_instance = cloudmersive_virus_api_client.ScanApi(cloudmersive_virus_api_client.ApiClient(configuration))input_file = '/path/to/file' # file | Input file to perform the operation on.try:# Scan a file for virusesapi_response = api_instance.scan_file(input_file)pprint(api_response)except ApiException as e:print("Exception when calling ScanApi->scan_file: %s\n" % e)

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Shell scripting — the awk way to web scraping and other tasks

The ALTER team has hit the ground running in 2022 with relentless efforts to ramp up towards the…

How to participate in BakerySwap yield farming on BSC?

How To Export Text From Adobe Illustrator and Photoshop To Notepad?

Depiction of Text Extraction From Adobe Illustrator & Photoshop into Notepad.

How to add extra volume/disk to instances and extend volumes or resize it?

Apple clearly had a goal to improve the Messages app.

Welcome to the Biz Apps Zone

Python — Synonyms and Antonyms

Python Synonyms and Antonyms

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
Cloudmersive

Cloudmersive

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

More from Medium

Generate a UPC-A code barcode as PNG file in Python

Python GUI frameworks

How to Run Python Flask App Online using Ngrok?

How to Receive WhatsApp messages using python and webhook