A processor can do anything you want to do between a pull and push operation. Filtering data is a typical processor operation.
You can find some demo implementations under databus/processor/demo, or check "Used by" to see real life examples.
Currently, Databus provides a ready-to-use processor in databus/processor/email_filter_excel_attachment.py . This is meant to be used with the E-Mail passenger. It will scan the attachments of the E-Mail, and if it doesn't contain any Excel attachments, the passenger will be marked as "complete" and won't be processed. This is particularly useful if you are expecting E-Mails with Excel attachments.
Implementing a new processor
To implement a new processor;
- Ensure that the corresponding passenger & puller classes exist. If not, create them first.
- Derive a new class from databus.processor.abstract_processor
- Ensure that your .py file has only one class (which is the processor)
- Ensure calling super().init()
- Add the processor class to your client configuration.