How to make a plugin architecture batch Python tools?

I want to make the functionality of the program could easily expand the community in some standard way.

For example, doing a simple program like ls, it iterates through the files and causes all plugins to file. All the plugins we have inherited from our class Plugin(). There is only NamePlugin() which writes the file name.

Further, the user makes "pip install lsplugins.filesize" puts a package (another developer) and we have more and FileSizePlugin() and our ls still writes to the file size. And if you install PluginMD5(), it will be even and md5 sums to write.

It is possible to do so (the package of the second level, from another vendor)?

Want additional functionality appear automatically after "pip install ...", so somehow our code has to know about all available plugins.

PS
There are all sorts of frameworks for plugins. You can write your own. Throw all the plugins in some directory and import them as files. But it's all ugly. Maybe there is a standard Python path.
March 19th 20 at 08:56
1 answer
March 19th 20 at 08:58
Solution
https://packaging.python.org/guides/creating-and-d...
It seems that the standard path is still there.
Thank you! Exactly what I needed! (just not responded - been busy, and now implemented plugins in the program). - Grace.Nitzsc commented on March 19th 20 at 09:01

Find more questions by tags Designing softwarePython