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:

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

Return type:

dict

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