antivirus package

There are two levels of abstraction - AMPQ API and python API.

AQMP API is higlevel API, where you send some structure, something happens in magick box and you get back another structure.

Python API is just collection of “lowlevel” python wrappers over ClamAV.

AMQP API

AMQP interface used by edeposit.amqp package.

antivirus.reactToAMQPMessage(message, UUID)[source]

React to given (AMQP) message. message is expected to be collections.namedtuple() structure from structures filled with all necessary data.

Parameters:
  • message (object) – One of the request objects defined in structures.
  • UUID (str) – Unique ID of received message.
Returns:

Response class from structures.

Return type:

object

Raises:

ValueError – if bad type of message structure is given.

All AMQP communication structures can be found in structures submodule.

../_images/amqp.png

Package configuration

If you wish to change behavior or paths to some of the files, you can use do it in settings submodule.