Skip to main content

Python library to interact with AvCheck API

Project description

AvCheck Python Library

Overview

A Python library to interact with the AvCheck API. This library provides methods to retrieve service information, get task data, and create new tasks.

Installation

pip install avcheck

Usage

from avcheck import AvCheckClient, AvCheckException, InvalidInputException

api_key = "your_api_key"
client = AvCheckClient(api_key)

# Get service information
try:
    service_info = client.get_service_info()
    print(service_info)
except AvCheckException as e:
    print(f"Error: {e}")

# Get task data
try:
    task_data = client.get_task_data("task_id")
    print(task_data)
except InvalidInputException as e:
    print(f"Invalid Input: {e}")
except AvCheckException as e:
    print(f"Error: {e}")

# Create a new task
try:
    task_id = client.create_new_task(file_path="path/to/file")
    print(f"New task created with ID: {task_id}")
except InvalidInputException as e:
    print(f"Invalid Input: {e}")
except AvCheckException as e:
    print(f"Error: {e}")

# Get engines status
try:
    engines_status = client.get_engines_status(task_data)
    print(engines_status)
except AvCheckException as e:
    print(f"Error: {e}")

# Get file detection status
try:
    file_detection_status = client.get_file_detection_status(task_data, "file_name")
    print(file_detection_status)
except AvCheckException as e:
    print(f"Error: {e}")

# Check if a specific engine detected a threat
try:
    detected = client.did_engine_detect(task_data, "engine_name", "file_name")
    print(detected)
except AvCheckException as e:
    print(f"Error: {e}")

# Extract array from data
try:
    array_data = client.extract_array_from_data(task_data, "key")
    print(array_data)
except AvCheckException as e:
    print(f"Error: {e}")

# Get all engines
try:
    all_engines = client.get_all_engines(service_info)
    print(all_engines)
except AvCheckException as e:
    print(f"Error: {e}")

# Get engine by name
try:
    engine_details = client.get_engine_by_name(service_info, "avast")
    print(engine_details)
except AvCheckException as e:
    print(f"Error: {e}")

# Get engines by type
try:
    type_3_engines = client.get_engines_by_type(service_info, 3)
    print(type_3_engines)
except AvCheckException as e:
    print(f"Error: {e}")

# Check if an engine is available
try:
    is_available = client.is_engine_available(service_info, "avast")
    print(is_available)
except AvCheckException as e:
    print(f"Error: {e}")

# Get engine names
try:
    engine_names = client.get_engine_names(service_info)
    print(engine_names['shortname'])
    print(engine_names['longname'])
except AvCheckException as e:
    print(f"Error: {e}")

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

avcheck-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

avcheck-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file avcheck-0.1.0.tar.gz.

File metadata

  • Download URL: avcheck-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for avcheck-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6d5e98cea73ec640a17d163e2cbd371a5d895f6d296d31ebd977e5c8285704f
MD5 377f165eb81c3d90f505b53d62680c0d
BLAKE2b-256 472c2691506f4f978536844fd5dd7600ae5cacee744e627ddd13e6f20be6550f

See more details on using hashes here.

File details

Details for the file avcheck-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: avcheck-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for avcheck-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9397d53497c245d0e1b30c319d6be9c3028bfe9e857428c4712c20b34046266b
MD5 bf3a4be4cdafc128cc47995a030af780
BLAKE2b-256 1fb4251bd6eef6840c2d677ae9c71f25578840364fc3607b59e9f835cb031909

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page