clamd
Clamd is a python interface to Clamd (Clamav daemon).
What it is and what it does
clamd is a lightweight Python wrapper around the ClamAV antivirus daemon, enabling you to send files and byte streams to a running clamd service for malware scanning. It communicates with the daemon via Unix sockets or TCP and returns scan results indicating whether threats were found. The package has no runtime dependencies and is designed to be portable across operating systems.
You use it by instantiating a connection object (Unix socket or TCP), then calling methods like scan(), instream(), ping(), and version() to interact with the daemon. It is not a standalone scanner—it requires you to install and run the ClamAV daemon separately on your system or network. The package is dormant, with no releases since 2014, so it may not be tested against recent ClamAV versions or Python releases.
Use it for:
- Integrate antivirus scanning into a web application to check uploaded files before storage or processing.
- Build a file monitoring service that scans new files in a directory for malware in real time.
- Add malware detection to a data pipeline or ETL process to quarantine suspicious content.
- Scan email attachments or downloaded files in a desktop application before user access.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
clamd is a Python interface to the ClamAV antivirus daemon, allowing you to scan files and streams for malware on Windows, Linux, macOS, and other platforms.
Yes, if you need a simple Python interface to ClamAV and can tolerate dormant maintenance. The package is lightweight, dependency-free, and works for basic scanning tasks. However, verify compatibility with your ClamAV daemon version and Python release first, and be aware that no active development means bugs or incompatibilities will not be fixed upstream.
Install
clamd on PyPI
pip
pip install clamduv
uv add clamdpoetry
poetry add clamdInstalling clamd
Before you install
Installation is straightforward with no runtime dependencies. However, the package is dormant—last release was 2014-08-21 and last commit 2024-01-04—so expect no active maintenance or updates.
License in practice
Released under LGPL (copyleft), which requires that derivative works and modifications remain under the same license; acceptable for most projects but review your own licensing obligations before use.
Quickstart
import clamd
cd = clamd.ClamdUnixSocket()
cd.ping()
cd.scan('/path/to/file')
Requires a running ClamAV daemon (clamd) to be installed and started separately on the system; the Python module is only a client interface.
Verify before relying
- Whether the package works reliably with modern ClamAV daemon versions given the last release was 2014.
- Current Python version compatibility (requires_python is unspecified in the fact sheet).
- Whether Unix socket and TCP connection modes both remain functional.
Package facts
| License | UNKNOWN (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 4,376 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,212,955/month — #4,210 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: clamd-1.0.2-py2.py3-none-any.whl
Keywords: python, clamav, antivirus, scanner, virus, libclamav, clamd
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
clamav-clientA Python client library for the ClamAV…
copyleft · top 15,000 on PyPI
cvdupdateDownloads and maintains a local ClamAV…
permissive · top 5,000 on PyPI
pyClamdpyClamd provides a Python interface to the…
copyleft · top 15,000 on PyPI
cartCaRT is a file format and Python library for…
permissive · top 15,000 on PyPI
guarddogGuardDog is a CLI tool that scans PyPI, npm,…
permissive · top 15,000 on PyPI
daemonizeDaemonize provides a Python library for…
permissive · top 15,000 on PyPI
vt-pyOfficial Python client for the VirusTotal REST…
permissive · top 15,000 on PyPI
picklescanScans Python Pickle files and related…
permissive · top 15,000 on PyPI
pymavlinkPymavlink is a Python implementation of the…
copyleft · top 15,000 on PyPI
pytest-hot-reloadingA pytest plugin that runs a daemon to watch and…
unclear · top 15,000 on PyPI