libclamav-py is a Python library that provides a seamless interface to the ClamAV antivirus engine via libClamAV. This wrapper directly calls the C API of Libclamav
Project description
libclamav-py
libclamav-py is a Python wrapper for the ClamAV library, providing an interface to ClamAV's virus scanning capabilities.
Features
- Directly invokes the C API of libclamav, so the clamd daemon doesn't need to be running on your machine
- Lambda Layer which libclamav is binded (TODO)
Installation
To install libclamav-py, use pip:
pip install libclamav-py
Usage
Here is a basic example of how to use libclamav-py:
from libclamav_py.clamav import Client
# Initialize the libclamav engine with the default setting
client = Client(libclamav_path="/lib/libclamav.so")
# Or libclamav client can be initialized from clamd.conf
client = Client.from_clamd_conf(clamd_conf_path="/etc/clamd.conf", libclamav_path="/lib/libclamav.so")
# Load virus definitions
client.load_db()
# Compile engine
client.compile_engine()
# Scan a file
result = client.scan_file('/path/to/file')
if result:
print(f"Virus detected: {result}")
else:
print("No virus detected")
License
This project is licensed under the GPL-2.0 License. See the LICENSE file for details.
Acknowledgements
- ClamAV for the virus scanning engine
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libclamav_py-0.2.0.tar.gz.
File metadata
- Download URL: libclamav_py-0.2.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85b347bb9e82a29096dd4fc1795377dff43ee46ae2289576cacbb0dd37b732ca
|
|
| MD5 |
06e3511f0dbbefd47270312ada44ae18
|
|
| BLAKE2b-256 |
069240d85c6ca1cb96826e7af2f5c369e1523f6ee2285a01d6c78f2b32f0ac3a
|
Provenance
The following attestation bundles were made for libclamav_py-0.2.0.tar.gz:
Publisher:
release.yaml on tkasuz/libclamav-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libclamav_py-0.2.0.tar.gz -
Subject digest:
85b347bb9e82a29096dd4fc1795377dff43ee46ae2289576cacbb0dd37b732ca - Sigstore transparency entry: 158472584
- Sigstore integration time:
-
Permalink:
tkasuz/libclamav-py@3b7d0f8b1d0c291a00c08e825069059e66277440 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tkasuz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@3b7d0f8b1d0c291a00c08e825069059e66277440 -
Trigger Event:
push
-
Statement type:
File details
Details for the file libclamav_py-0.2.0-py3-none-any.whl.
File metadata
- Download URL: libclamav_py-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8d8140dcc205d730c28f1d4e45a2ff7ce46ac2942ee1873a3475cd79da559a2
|
|
| MD5 |
2eeb2b50e2f60b84c033ee29c9d52b1e
|
|
| BLAKE2b-256 |
d07effeee5cca223d099c64b80455fba0a78a5eec45c35f614ce4672cbd07e02
|
Provenance
The following attestation bundles were made for libclamav_py-0.2.0-py3-none-any.whl:
Publisher:
release.yaml on tkasuz/libclamav-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libclamav_py-0.2.0-py3-none-any.whl -
Subject digest:
c8d8140dcc205d730c28f1d4e45a2ff7ce46ac2942ee1873a3475cd79da559a2 - Sigstore transparency entry: 158472587
- Sigstore integration time:
-
Permalink:
tkasuz/libclamav-py@3b7d0f8b1d0c291a00c08e825069059e66277440 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tkasuz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@3b7d0f8b1d0c291a00c08e825069059e66277440 -
Trigger Event:
push
-
Statement type: