Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
language: python
python: 3.5
python:
- 3.8
- 3.9
- 3.10
- 3.11
- 3.12
env:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=pypy
- TOX_ENV=py34
- TOX_ENV=py35
# Python 3 versions for Tox
- TOX_ENV=py38
- TOX_ENV=py39
- TOX_ENV=py310
- TOX_ENV=py311
- TOX_ENV=py312
- TOX_ENV=lint
install:
- sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs
- sudo apt-get update -qq
- sudo apt-get install -y clamav-daemon clamav-freshclam
- sudo freshclam --verbose
- sudo service clamav-daemon start
- pip install tox
Expand Down
31 changes: 22 additions & 9 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,40 +1,53 @@
Changes
=========

1.1.0 (2025-11-25)
------------------

* **Removed Python 2 support entirely.** The library is now **Python 3 only** (targeting Python 3.8+).
* Updated and enhanced all **docstrings** and type hints for improved clarity and maintainability.

---

1.0.3 (unreleased)
------------------

- Nothing changed yet.
* Nothing changed yet.

---

1.0.2 (2014-08-21)
------------------

- Remove all dependencies. clamd is now standalone!
- Use plain setuptools no d2to1.
- Create universal wheel.
* Remove all dependencies. `clamd` is now standalone!
* Use plain setuptools, no d2to1.
* Create universal wheel.

---

1.0.1 (2013-03-06)
------------------

- Updated d2to1 dependency
* Updated d2to1 dependency

---

1.0.0 (2013-02-08)
------------------

- Change public interface, including exceptions
- Support Python 3.3, withdraw 2.5 support
* Change public interface, including exceptions.
* Support Python 3.3, withdraw 2.5 support.

---

0.3.4 (2013-02-01)
------------------

- Use regex to parse file status reponse instead of complicated string split/join
* Use regex to parse file status response instead of complicated string split/join.

---

0.3.3 (2013-01-28)
------------------

- First version of clamd that can be installed from PyPI
* First version of clamd that can be installed from PyPI
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include CHANGES.rst
include README.rst
include ez_setup.py

recursive-exclude * __pycache__
recursive-exclude * *.py[co]
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# clamd

## About
`python_clamd` is a modernized Python wrapper for the [ClamAV](https://www.clamav.net/) anti-virus engine.
It allows you to interact with a running `clamd` daemon on **Linux, macOS, and Windows**.

This project is a fork of `python-clamd` (last updated 2014), itself a fork of `pyClamd` v0.2.0 by Philippe Lagadec, which in turn extended `pyClamd` v0.1.1 by Alexandre Norman.

### Why this fork?
- Updated for **Python 3.12+ compatibility** (replaced deprecated `pkg_resources` with `importlib.metadata`).
- Added **type hints and annotations** for better IDE/autocomplete and `mypy` support.
- Actively maintained with patches and modernization.

---

## Usage

### Connect via Unix socket
```python
import python_clamd
cd = python_clamd.ClamdUnixSocket()
cd.ping() # 'PONG'
cd.version() # 'ClamAV ...'
cd.reload() # 'RELOADING'
```

### Scan a file
```python
open('/tmp/EICAR','wb').write(python_clamd.EICAR)
cd.scan('/tmp/EICAR')
# {'/tmp/EICAR': ('FOUND', 'Eicar-Test-Signature')}
```

### Scan a stream
```python
from io import BytesIO
cd.instream(BytesIO(python_clamd.EICAR))
# {'stream': ('FOUND', 'Eicar-Test-Signature')}
```

## Installation
### Python package

Coming soon via PyPI:
```python
pip install python-clamd
```

### ClamAV daemon
On Ubuntu:
```bash
sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs
sudo freshclam
sudo service clamav-daemon start
```

## Supported Versions
* [x] Python 3.9 – 3.13
* [ ] Python 2.x (dropped)

## License
Released under the LGPL license.

## Contributing
PRs and issues are welcome. This fork exists to keep ClamAV bindings usable on modern Python.
53 changes: 0 additions & 53 deletions README.rst

This file was deleted.

Loading