G DATA Verdict-as-a-Service Python client
Project description
gdata-vaas
An SDK to easily utilize G DATA VaaS.
Verdict-as-a-Service (VaaS) is a service that provides a platform for scanning files for malware and other threats. It allows easy integration in your application. With a few lines of code, you can start scanning files for malware.
What does the SDK do?
It gives you as a developer a functions to talk to G DATA VaaS. It wraps away the complexity of the API into 3 basic functions.
for_sha256
If you calculate the sha256 for a file, you can request that sha256 against G DATA VaaS. It's the fastest way to get a verdict from our service.
for_url
If you want to request if a file behind a URL is safe, you can specify the URL as well. Depending on the file size, the duration for the analysis can vary.
for_file
You can also ask for a file itself. You will still get the benefit of a fast verdict via Sha256 because the SDK will do that for you first. But additionally, if we don't know the file, the file will get uploaded and (automatically) analyzed by us.
What do the Verdicts look like
The verdicts are simple. They are either
Clean: The scanners didn't find anything malicious.Malicious: The scanners found something malicious.Unknown: We don't know the file hash yet. A scan is then performed for each exceptfor_sha256function.Pup: Potentially Unwanted Program (Adware, Spyware, etc.)
The scan functions will return the following dict:
{
"Sha256": "<Sha256>",
"Guid": "<Guid>",
"Verdict": <"Clean"|"Malicious"|"Unknown"|"Pup">,
"Detection": "<Name of the detected malware>",
"FileType": "<FileType>",
"MimeType": "<MimeType>"
}
How to use
Installation
pip3 install gdata-vaas
gdata-vaas requires Python 3.12+.
Import
from vaas import Vaas, ClientCredentialsGrantAuthenticator
Request a verdict
Authentication & Initializing:
authenticator = ClientCredentialsGrantAuthenticator(
CLIENT_ID,
CLIENT_SECRET,
TOKEN_URL,
SSL_VERIFICATION
)
vaas = Vaas(authenticator=authenticator)
The Vaas instance can and should be used for multiple requests.
Verdict Request for SHA256:
sha256 = "275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f"
verdict = await vaas.for_sha256(sha256)
Verdict Request for a file:
path = "/path/to/file"
verdict = await vaas.for_file(path)
Verdict Request for a URL:
url = "https://www.gdatasoftware.com/oem/verdict-as-a-service"
verdict = await vaas.for_url(url)
I'm interested in VaaS
You need credentials to use the service in your application. If you are interested in using VaaS, please contact us.
Developing with Visual Studio Code
Every single SDKs also includes Devcontainer. If you use the Visual Studio Code Dev Containers extension, you can run the code in a full-featured development environment.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gdata_vaas-6.0.4.tar.gz.
File metadata
- Download URL: gdata_vaas-6.0.4.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abc3fc862eab8cf9c88f5b2e1350e2b799f58802ac1024d534ee1c6207b75f6d
|
|
| MD5 |
1aeca0513e9643d95f8dfc257299f87e
|
|
| BLAKE2b-256 |
0f46154745f1988c1b2127881a2594aa77498f5ace2a49b32d4be48cf83e3a4b
|
File details
Details for the file gdata_vaas-6.0.4-py3-none-any.whl.
File metadata
- Download URL: gdata_vaas-6.0.4-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1854f6af1227c597f6cfd44f9996367cfddccbf0467d1930fbe4e8e7a57e64d0
|
|
| MD5 |
8e4a70f4f6b26a3ca62e7ff54ecffec3
|
|
| BLAKE2b-256 |
8dae0ac2f37f49377b1016f47e11ce03ebb3b3a9633ffca8bebe0b571591dd32
|