Defining Custom Processors
Introduction
Why Custom Processors?
How Processors Work
Example of a Simple Processor
from . import Processor
class DoubleValueProcessor(Processor.processor):
def process(self, publisher, value):
publisher.value = value * 2
def subscribe(self, publisher, pool_scheduler=None):
observable = publisher.observe(publisher.EVENT_PROCESSED)
observable.subscribe(lambda value: self.process(publisher, value), scheduler=pool_scheduler)Integrating Custom Processors
Advanced Usage
Conclusion
Last updated