Skip to main content

libclamav-py

test PyPI PyPI - Downloads

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)

Source distribution for libclamav-py 0.2.0
File Size Uploaded
libclamav_py-0.2.0.tar.gz 13.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for libclamav-py 0.2.0
File Interpreter ABI Platform
libclamav_py-0.2.0-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page