Statistics Plugin

A simplistic approach to statistics gathering which works by default and requires no further setup.

class antispam.plugins.Stats(anti_spam_handler: antispam.anti_spam_handler.AntiSpamHandler)

A simplistic approach to aggregating statistics across the anti spam package.

Do note however, it assumes plugins do not error out. If a plugin errors out, this will be inaccurate.

This does play with internals a bit, however, it is distributed within the library I am okay modifying the base package to make this work even better.

__init__(anti_spam_handler: antispam.anti_spam_handler.AntiSpamHandler)

Initialize self. See help(type(self)) for accurate signature.

injectable_nonce = 'Issa me, Mario!'
propagate(message, data: antispam.dataclasses.core.CorePayload) → dict

This method is called whenever the base antispam.propagate is called, adhering to self.is_pre_invoke

Parameters:
Returns:

A dictionary of useful data to the end user

Return type:

dict