Web lists-archives.com

KIPI Plugins and Python




Hello

I went through KIPI plugins and had some suggestions.
Currently, KIPI Plugins are written in C++. It's great, fast, but a bit complex, compared to the alternative implementation in Python.

How about reimplementing it in Python? It's easy, scalable.

I had some thoughts to do the same:
* Reimplement the plugins in Python (Python3).

* As it is done currently, other applications using KIPI plugins can use the same API (in C++) to do the image upload/download task, where the C++ helper would spawn some Python subprocess to do the entire task.

* Use some sort of IPC, like File IO to get the response back to the calling program (if required). We can also consider "libpython" as a candidate. https://docs.python.org/3/extending/embedding.html 

Advantages:
* Ease of maintenance, as APIs tend to change fast, and so your callbacks within the program.
* The task is network bound, and not CPU intensive. So, Python is a good choice.
* Python "requests" module is very reliable to handle HTTP requests.
* Objectives can be achieved better with lesser lines of code.
* This could also pave way for creating plugins for other online services and integrating with KDE (like GNOME online accounts).


I would like to have your review on the same. 
If you agree, I can work on some simple prototype by the weekend for a demo.
--

Regards 

Himanshu Shekhar

https://github.com/himanshub16/