Virus and Malware Scan SDKs for Java, Python, JavaScript, and TypeScript
As a developer, I’m a huge fan of APIs. But dealing with the nitty-gritty details of calling the API can be challenging. Therefore, I’m thrilled to announce that we are publishing software development kits (SDKs) for the Virus and Malware Scan API by attachmentAV.
We provide Virus and Malware Scan SDKs for the following languages:
Your beloved programming language is missing? Let us know!
What is attachmentAV?
attachmentAV offers antivirus for SaaS and cloud platforms. Scan your files and attachments stored in the cloud for viruses, worms, and trojans. attachmentAV detects malware in real-time. Supports Amazon S3, Atlassian, Cloudflare R2, Salesforce, WordPress, and more.
The attachmentAV Virus and Malware Scan API provides a REST API that allows you to integrate malware scans into your application. The solution comes in two variants:
- attachmentAV Virus Scan API (SaaS): get started quickly with a fully-managed service
- attachmentAV Virus Scan API (self-hosted on AWS): deploy the production-ready API on AWS
attachmentAV raises the bar for information security. Our solution is ISO 27001 certified and GDPR compliant. We are establishing, implementing, maintaining, and continually improving an information security management system (ISMS). Sensitive data is encrypted in transit as well as at rest and deleted immediately after processing. More than 1,000 customers trust our malware protection technology.
Example: Virus Scan with Python
First, install the module.
pip install attachmentav-virus-malware-scan-sdk
Second, get an API key by subscribing to the attachmentAV API (SaaS).
Third, send a scan request. Make sure to replace the <API_KEY_PLACEHOLDER>
placeholder.
import attachmentav
configuration = attachmentav.Configuration()
configuration.api_key['apiKeyAuth'] = "<API_KEY_PLACEHOLDER>"
with attachmentav.ApiClient(configuration) as api_client:
api_instance = attachmentav.AttachmentAVApi(api_client)
with open("path/to/file", "rb") as file:
file_content = file.read()
scan_result = api_instance.scan_sync_binary_post(file_content)
print(scan_result)
The request returns a scan result similar to the following example.
{"status":"clean","size":"1024","realfiletype":"..."}
Example: Malware Protection for Java
After you have subscribed to attachmentAV Virus Scan API (SaaS) or deployed attachmentAV Virus Scan API (self-hosted on AWS), proceed with installing and configuring the SDK.
Find the latest version of the virus-scan-sdk on Maven Central and add it to the dependencies of your project.
<dependency>
<groupId>com.attachmentav</groupId>
<artifactId>virus-scan-sdk</artifactId>
<version>0.4.0</version>
</dependency>
An active subscription and API key is required. Replace <API_KEY_PLACEHOLDER>
with the API key.
import com.attachmentav.client.ApiClient;
import com.attachmentav.client.ApiException;
import com.attachmentav.client.Configuration;
// ...
ApiClient client = Configuration.getDefaultApiClient();
client.setApiKey("<API_KEY_PLACEHOLDER>");
AttachmentAvApi api = new AttachmentAvApi();
Next, send a file to the attachmentAV Virus Scan API and process the scan result.
ScanResult result = api.scanSyncBinaryPost(testFile);
System.out.println("Scan Result: " + result.getStatus());
Summary
We are thrilled to announce the release of our new Software Development Kits (SDKs) for the attachmentAV Virus and Malware Scan API, now available for Java, Python, JavaScript, and TypeScript. We developed these SDKs to make it even easier for you to integrate robust malware scanning directly into your applications, taking care of the nitty-gritty API call details so you don’t have to. We encourage all developers to explore these new SDKs and enhance their application’s security with attachmentAV’s real-time malware protection.
Published on July 21, 2025 | Written by Andreas