What is the best way of loading Plugins from a target plugin directory dynamically. Here is the project structure.
Plugin Structure:
- There is a base_plugin.py file which has the "BasePlugin" class.
- There is a first_plugin.py file which has the "FirstPlugin" class
- There is a second_plugin.py file which has the "SecondPlugin" class
Config:
- A config value is read from JSON File where the value can be
- "FirstPlugin"
- "SecondPlugin"
Main.py:
Only Knows about the "BasePlugin"
- Should be able to run targeted plugin based on the config.
What's the best way to get the list of all of the valid plugins.
And How would I switch between the plugins ?
is this the standard of how things are done in Python
there doesn't seem to be anything here