Kodi Community Forum
Req Python3 compatible equivalent to xbmcswift2 - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
--- Thread: Req Python3 compatible equivalent to xbmcswift2 (/showthread.php?tid=346026)



Python3 compatible equivalent to xbmcswift2 - leopheard - 2019-08-05

Hi all,

Since new addons need to be python3 and xbmcswift2 isn't compatible, what is the equivalent I can use? I've tried xbmc but I can't import my plugin route from this as it doesn't have a module it seems. Obviously, I can search for guides on xbmcswift2 all day long, but searching for "xbmc python guide" doesn't give me the userguide I need for obvious reasons.


RE: Python3 compatible equivalent to xbmcswift2 - bigretromike - 2019-08-08

If you looking for routing aspect: https://github.com/tamland/kodi-plugin-routing
If you looking for running addon from command line, than I would like to know too.


RE: Python3 compatible equivalent to xbmcswift2 - leopheard - 2019-08-14

(2019-08-08, 06:54)bigretromike Wrote: If you looking for routing aspect: https://github.com/tamland/kodi-plugin-routing
If you looking for running addon from command line, than I would like to know too.

Thanks yeah, I found that, only problem is I have no idea how to translate my current addon into that format as the functions are all different and this script has only a very brief guide.


RE: Python3 compatible equivalent to xbmcswift2 - Roman_V_M - 2019-08-20

As a web developer I initially liked this Flask-like decorator syntax of xbmcswift but now based on my experience I can tell you that the less abstractions you have the better your code is. Abstractions are too brittle and in case of third-party dependencies there's always a chance that the library you are using will be abandoned because its developer's interests changed.
So I'd recommend to stick to raw Kodi Python API as much as possible.