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
Metadata
Release files for libclamav-py 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| libclamav_py-0.2.0.tar.gz | 13.9 kB | With provenance | Details for libclamav_py-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| libclamav_py-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for libclamav_py-0.2.0-py3-none-any.whl |
Total release size: 29.3 kB
Release files / libclamav_py-0.2.0.tar.gz
| Download URL | libclamav_py-0.2.0.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85b347bb9e82a29096dd4fc1795377dff43ee46ae2289576cacbb0dd37b732ca
|
|
BLAKE2b-256 checksum How to use checksums |
069240d85c6ca1cb96826e7af2f5c369e1523f6ee2285a01d6c78f2b32f0ac3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 31, 2024.
Transparency logRelease files / libclamav_py-0.2.0-py3-none-any.whl
| Download URL | libclamav_py-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8d8140dcc205d730c28f1d4e45a2ff7ce46ac2942ee1873a3475cd79da559a2
|
|
BLAKE2b-256 checksum How to use checksums |
d07effeee5cca223d099c64b80455fba0a78a5eec45c35f614ce4672cbd07e02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 31, 2024.
Transparency logSecurity for libclamav-py 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for libclamav_py-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 31, 2024.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.