--- id: clamav-client version: "0.7.2" license: GPL-2.0 license_treatment: copyleft maintenance: active --- # clamav-client — Python client library for the ClamAV antivirus. License: copyleft · Maintenance: active · Downloads: 145.1K/mo ## What it is and what it does clamav-client is a Python wrapper around the ClamAV antivirus engine's clamd daemon. It provides both a low-level client interface (via the clamd module) for direct daemon communication over TCP or Unix sockets, and a high-level scanner interface that abstracts over both clamd and the clamscan command-line tool. The package is a maintained fork of an earlier clamd library, adding type hints and testing against supported Python versions. You use it when you need to integrate antivirus scanning into a Python application—typically to check uploaded files, monitor directories, or validate content before processing. The library handles the socket communication and protocol details, leaving you to focus on scan logic and result handling. It requires an external ClamAV installation with the clamd daemon running; it does not bundle or manage the antivirus engine itself. Use it for: - Scan uploaded files in a web application before storing them to disk. - Integrate malware detection into a document processing pipeline. - Monitor a directory for infected files using clamd or clamscan. - Build a file quarantine system that checks content before restoration. - Validate attachments in an email or messaging system. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python client library for the ClamAV antivirus engine that connects to a running clamd daemon via TCP or Unix sockets, supporting file scanning on Windows, Linux, macOS, and other platforms. Yes, if you need Python-based ClamAV integration and already run clamd. The package has low install friction, no runtime dependencies, active maintenance, and a copyleft license that is manageable in most contexts. No known vulnerabilities. The main constraint is the external clamd requirement—without a running ClamAV daemon, the library cannot function. ## Install pip install clamav-client uv add clamav-client poetry add clamav-client ## Installing clamav-client Before you install: Low install friction with no runtime dependencies. The package is actively maintained with a recent release and supports current Python versions (3.9+). Repository shows steady activity. License in practice: Licensed under GPL-2.0 (copyleft). Any software linking this library must comply with copyleft obligations—distribute source code and apply the same license to derivative works. Quickstart: pip install clamav-client from clamav_client import get_scanner scanner = get_scanner() result = scanner.scan_file('/path/to/file') Requires a running clamd daemon instance (ClamAV antivirus service) accessible via TCP or Unix socket before the client can connect. Verify before relying: - Whether the package works with ClamAV versions other than those tested by maintainers. - Performance characteristics when scanning large files or directories. - Specific error handling and retry behavior for network failures to clamd. ## Package facts - License: GPL-2.0 (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 145.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags clamav python client, clamd daemon connector, antivirus file scanner python, clamav tcp unix socket, malware detection python library, antivirus, malware-detection [View on SkillFed](https://skillfed.io/packages/clamav-client) · [View on PyPI](https://pypi.org/project/clamav-client/)