Clamd is a python interface to Clamd (Clamav daemon). By using Clamd, you can add virus detection capabilities to your python software in an efficient and easy way.

Language: Python


travis build status


clamd is a portable Python module to use the ClamAV anti-virus engine on Windows, Linux, MacOSX and other platforms. It requires a running instance of the clamd daemon.

This is a fork of pyClamd v0.2.0 created by Philippe Lagadec and published on his website: which in turn is a slightly improved version of pyClamd v0.1.1 created by Alexandre Norman and published on his website:


To use with a unix socket:

>>> import clamd
>>> cd = clamd.ClamdUnixSocket()
>>> cd.version()                             # doctest: +ELLIPSIS
'ClamAV ...
>>> cd.reload()

To scan a file:

>>> open('/tmp/EICAR','wb').write(clamd.EICAR)
>>> cd.scan('/tmp/EICAR')
{'/tmp/EICAR': ('FOUND', 'Eicar-Test-Signature')}

To scan a stream:

>>> from io import BytesIO
>>> cd.instream(BytesIO(clamd.EICAR))
{'stream': ('FOUND', 'Eicar-Test-Signature')}


clamd is released as open-source software under the LGPL license.

clamd Install

How to install the ClamAV daemon clamd under Ubuntu:

sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs
sudo freshclam
sudo service clamav-daemon start

Project Statistics

Sourcerank 5
Repository Size 80.1 KB
Stars 15
Forks 9
Watchers 5
Open issues 4
Dependencies 0
Contributors 3
Tags 6
Last updated
Last pushed

Top Contributors See all

Thomas Grainger Venelin Stoykov Byron Clark

Packages Referencing this Repo

Clamd is a python interface to Clamd (Clamav daemon).
Latest release 1.0.2 - Updated - 15 stars

Recent Tags See all

1.0.2 August 21, 2014
1.0.1 March 06, 2013
1.0.0 February 08, 2013
0.3.4 February 01, 2013
0.3.3 January 28, 2013
0.3.2 January 28, 2013

Interesting Forks See all

Clamd is a python interface to Clamd (Clamav daemon). By using Clamd, you can add virus detection...
Python - Updated - 1 stars - 1 forks

Something wrong with this page? Make a suggestion

Last synced: 2016-05-27 19:40:26 UTC

Login to resync this repository