clamd wrapper

API for scanning files using clamd daemon.

antivirus.wrappers.clamd.scan_file(path)[source]

Scan path for viruses using clamd antivirus daemon.

Parameters:

path (str) – Relative or absolute path of file/directory you need to scan.

Returns:

dict{filename: ("FOUND", "virus type")} or blank dict.

Raises:
  • ValueError – When the server is not running.
  • AssertionError – When the internal file doesn’t exists.

Previous topic

wrappers package

Next topic

clamscan wrapper

This Page