pyClamd library is a python interface to Clamd (Clamav daemon). By using pyClamd, you can add virus detection capabilities to your python software in an efficient and easy way.
Instead of pyClamav which uses libclamav, pyClamd may be used by a closed source product.
Usage:
From python :
Python 2.3.5 (#2, Sep 4 2005, 22:01:42)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyclamd
>>> pyclamd.init_network_socket('localhost', 3310)
>>> print pyclamd.version()
ClamAV 0.88.3/1598/Thu Jul 13 13:38:16 2006
>>> ret = pyclamd.scan_file('/tmp/eicar.com')
>>> print ret
{'/tmp/eicar.com': 'Eicar-Test-Signature'}
>>> ret = pyclamd.scan_file('/tmp/no_virus.txt')
>>> print ret
None
>>> ret = pyclamd.scan_stream(open('/tmp/eicar.com').read())
>>> print ret
{'stream': 'Eicar-Test-Signature FOUND'}
Product's homepage
Requirements:
· Python
· Clam AntiVirus
What's New in This Release: [ read full changelog ]
· This release fixes an error with deprecated string exceptions.
· It adds optional timeout to avoid blocking socket operations.
· The license is now LGPL.