Yakifo/amqtt

Abstract factory for plugins

romancardenas opened this issue · 1 comments

Hi,

I was a contributor of HBMQTT, and I remember that dealing with custom plugins was a pain.

For my work, I started using the abstract factory pattern for plugins in Python, and that works pretty well. It allows users to add their custom plugins dynamically by just calling a method. I do believe this pattern is more user-friendly and can fit in AMQTT.

Before implementing it, I wanted to ask about your opinion. If you are not interested in this change, I'll leave plugins alone :)

Having implemented plugins myself I would welcome this change. I personally don't like the current handling because it requires a custom setup.py file and with every change in the plugins I need to re-install the amqtt module itself. I feels like 'monkey-patching' something all the time.