Skip to content

Antiviruses

Get information about antivirus engines and distribution packs configured in the sandbox.

Code example
import asyncio
from ptsandbox import Sandbox, SandboxKey

async def main():
    sandbox = Sandbox(...)
    await sandbox.ui.authorize()

    engines = await sandbox.ui.get_av_engines()
    print(engines)

asyncio.run(main())

ptsandbox.sandbox.ui._system.SystemMixin.get_av_engines async

get_av_engines() -> SandboxAVEnginesResponse

Get information about antivirus scanners

Returns:

Raises:

  • SandboxException

    if not authorized or token refresh fails

  • ClientResponseError

    if the server returns an error status

  • ClientError

    on connection or transport errors

  • ValidationError

    if the response body does not match the expected model

Get settings of a specific engine

Code example
import asyncio
from ptsandbox import Sandbox, SandboxKey

async def main():
    sandbox = Sandbox(...)
    await sandbox.ui.authorize()

    engine = await sandbox.ui.get_av_engine("clamav")
    print(engine)

asyncio.run(main())

ptsandbox.sandbox.ui._system.SystemMixin.get_av_engine async

get_av_engine(
    item_id: str,
) -> SandboxAVEngineSettingsResponse

Get settings of a specific antivirus engine.

Parameters:

  • item_id (str) –

    antivirus identifier (engine code name, e.g. "clamav")

Returns:

Raises:

  • SandboxException

    if not authorized or token refresh fails

  • ClientResponseError

    if the server returns an error status

  • ClientError

    on connection or transport errors

  • ValidationError

    if the response body does not match the expected model

Get distribution packs

Code example
import asyncio
from ptsandbox import Sandbox, SandboxKey

async def main():
    sandbox = Sandbox(...)
    await sandbox.ui.authorize()

    packs = await sandbox.ui.get_av_distribution_packs()
    print(packs)

asyncio.run(main())

ptsandbox.sandbox.ui._system.SystemMixin.get_av_distribution_packs async

get_av_distribution_packs() -> (
    SandboxAVDistributionPacksResponse
)

Get the list of antivirus distributions available for installation.

Returns:

Raises:

  • SandboxException

    if not authorized or token refresh fails

  • ClientResponseError

    if the server returns an error status

  • ClientError

    on connection or transport errors

  • ValidationError

    if the response body does not match the expected model