Python module for controlling kodi over HTTP Json API
Project description
python kodi json client
Simple python module that allow kodi control over HTTP Json API. Virtually support all availables commands.
Install it :
pip install kodi-json
Usages examples :
Client instanciation
from kodijson import XBMC, PLAYER_VIDEO
#Login with default kodi/kodi credentials
kodi = XBMC("http://YOURHOST/jsonrpc")
#Login with custom credentials
kodi = XBMC("http://YOURHOST/jsonrpc", "login", "password")
Ping kodi
print kodi.JSONRPC.Ping()
UI interaction :
# Navigate throught windows
kodi.GUI.ActivateWindow({"window":"home"})
kodi.GUI.ActivateWindow({"window":"weather"})
# Show some notifiations :
kodi.GUI.ShowNotification({"title":"Title", "message":"Hello notif"})
# ...and so on
Parameters can alos be passed as python parameters:
kodi.GUI.ActivateWindow(window="home")
kodi.GUI.ActivateWindow(window="weather")
kodi.GUI.ShowNotification(title="Title", message = "Hello notif")
Library interaction :
kodi.VideoLibrary.Scan()
kodi.VideoLibrary.Clean()
# ...and so on
Everything to build a script thats act as a full remote
kodi.Application.SetMute({"mute":True})
kodi.Player.PlayPause([PLAYER_VIDEO])
kodi.Player.Stop([PLAYER_VIDEO])
kodi.Input.Left()
kodi.Input.Right()
kodi.Input.Up()
kodi.Input.Down()
kodi.Input.Back()
kodi.Input.Down()
kodi.Input.Info()
# ...and so on
See http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6 for availables commands.
Every kodi namespaces are accessible from the instanciated kodi client.
Every commands presents in the API documentation should be available.
You can take a look at xbmc-client for an implementation example.
Contribute
Please make your PR on the branch develop :)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for kodi_json-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 797a6f051760dcfc8872c6f18e31edaeae14800914c621fd742a724256b80e27 |
|
MD5 | 65338eeb2ad72bd99757bf37c515daca |
|
BLAKE2b-256 | 65f70d35d79c3f3082742b2d3df707c5a48525791ee312420a6079e62b282dc5 |
Hashes for kodi_json-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccca09a7ff92781a8c87ac4db345bae30c6bb0f09b4bfcba3e1bcdb63a566053 |
|
MD5 | ecdd32ca1ccd419a34dca3ca178dd977 |
|
BLAKE2b-256 | 3b4343c553de849393269cdb29d7f2e0ee033a411c8d7a95d365291109d57aa4 |