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.2.tar.gz (4.5 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.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: avcheck-0.1.2.tar.gz
  • Upload date:
  • Size: 4.5 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.2.tar.gz
Algorithm Hash digest
SHA256 5d1ba85f409144414942f125c1f4959b081b69d7c84c161936fa7643cc8292d9
MD5 8a4a28db5e1eedcc58ede9390636e8d4
BLAKE2b-256 c69150fd9c8a3cfe55836c9ddbf7ef8d5d797359cad7d0317e2a0474acd0777a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: avcheck-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8317f0b1ae9f2003e204b8b970d3a0b138e8556c77839865568d63e11de4777f
MD5 21901df41a4d757ef9b3f925fa53ac72
BLAKE2b-256 8601a729cc7097bc25b2d6b3cc7b1d633a5d73feb1d09ba0ba3243a89480d9d8

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