safe.postprocessors.abstract_postprocessor module

Abstract postprocessor class, do not instantiate directly

class safe.postprocessors.abstract_postprocessor.AbstractPostprocessor[source]

Bases: object

Abstract postprocessor class, do not instantiate directly. but instantiate the PostprocessorFactory class which will take care of setting up many prostprocessors. Alternatively you can as well instantiate directly a sub class of AbstractPostprocessor.

Each subclass has to overload the process method and call its parent like this: AbstractPostprocessor.process(self) if a postprocessor needs parmeters, then it should override the setup and clear methods as well and call respectively AbstractPostprocessor.setup(self) and AbstractPostprocessor.clear(self).

for implementation examples see AgePostprocessor which uses mandatory and optional parameters

NO_DATA_TEXT = u'No data'
clear()[source]

Abstract method to be called from the concrete implementation with AbstractPostprocessor.process(self) it takes care of results being cleared

Args:
None
Returns:
None
Raises:
None
description()[source]

Describe briefly what the post processor does.

process()[source]

Abstract method to be called from the concrete implementation with AbstractPostprocessor.process(self) it takes care of results being initialized

results()[source]

Returns the postprocessors results

Args:
None
Returns:
Odict of results
Raises:
None
setup(params)[source]

Abstract method to be called from the concrete implementation with AbstractPostprocessor.setup(self, None) it takes care of results being initialized

Args:
params: dict of parameters to pass to the post processor