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.1.tar.gz (4.4 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.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: avcheck-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 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.1.tar.gz
Algorithm Hash digest
SHA256 cdfeaf4741595014c9dd5109c6ee33c75cba00212741cc0cb67571db2dfd39a5
MD5 7d618e48546fbca388fd7e46c7e19be9
BLAKE2b-256 60b21652428c532be5650b67df4243dfc9a2ec0aaff2a39b8fd0a96dcbecb013

See more details on using hashes here.

File details

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

File metadata

  • Download URL: avcheck-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 356f4d1bf7d718d3e64a4d8e7d70e70f85d99d753058f231b511233d74d8b1c2
MD5 a894e86aa010bce7ee97d403c872a637
BLAKE2b-256 91d81ddd614ce377fd12fd26c8c30d3fd2727a2dabf9a1e61d07079f2855888b

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