Service addon add python dependencies
#1
Hi anyone, how can i use a external library on service addon, for example i'm want use websockets, now i'm trying put it only on addon.xml file and add on import tag on require tag. i'm confused.
Reply
#2
you can only add python modules in your addon.xml that are available in the repo.
there is no websockets module in the kodi repository.

also websockets is only compatible with python 3, so it will not work with the current kodi version.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
thanks by your answer, where can i see the modules?
am i can't install libraries or packages on zip and use it?

i'm use Kodi Leia and i see that has a python 2.7 to 3.7 versions installed.
Reply
#4
you can check here: http://mirrors.kodi.tv/addons/leia/
everything starting with 'script.module.' is a python library.

if libraries are available in our repo they will be installed automatically when your addon is installed if you require them in your addon.xml.
if they're not in our repo, they would need to be installed manually.

and trust me, kodi uses python 2.7 only.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
thank you @ronie
Reply
#6
You can use websockets with python 2.7.

websocket module: https://github.com/MediaBrowser/plugin.v...bsocket.py
example: https://github.com/MediaBrowser/plugin.v..._client.py

Just drop the websocket file in your project alongside your script.

import websocket
# do stuff
Reply
#7
i stand corrected :-)
the client indeed works fine with python 2.7
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#8
thanks @angelblue05 i'll try.
Reply

Logout Mark Read Team Forum Stats Members Help
Service addon add python dependencies0