Skip to main content

Python Versions Wheel status Licence Travis codecov

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 :)

Release files for kodi-json 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kodi-json 1.0.0
File Size Uploaded
kodi-json-1.0.0.tar.gz 6.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for kodi-json 1.0.0
File Interpreter ABI Platform
kodi_json-1.0.0-py3.5.egg Legacy Egg format - - Details
kodi_json-1.0.0-py3-none-any.whl Python 3 none any Details
kodi_json-1.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 18.6 kB

Release files / kodi-json-1.0.0.tar.gz

Download URL kodi-json-1.0.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
151e5ffe5024742a1d190d4100cc3d40eade332f1887a7582f3c608ef0e42c65
BLAKE2b-256 checksum
How to use checksums
cb2f34f9b4d54df7ee414b59c36a6e34394e045d27cea59746fa9209127b35c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / kodi_json-1.0.0-py3.5.egg

Download URL kodi_json-1.0.0-py3.5.egg
Size 4.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
98f6d28857fca9b375b9f841788ee8799f0c8134bc99b6c5345a3becfefb45fd
BLAKE2b-256 checksum
How to use checksums
e48926cd7f5505a4d4ded2921363b460a3cec38e0da22051326a7d640c59c1f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / kodi_json-1.0.0-py3-none-any.whl

Download URL kodi_json-1.0.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
797a6f051760dcfc8872c6f18e31edaeae14800914c621fd742a724256b80e27
BLAKE2b-256 checksum
How to use checksums
65f70d35d79c3f3082742b2d3df707c5a48525791ee312420a6079e62b282dc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / kodi_json-1.0.0-py2.py3-none-any.whl

Download URL kodi_json-1.0.0-py2.py3-none-any.whl
Size 3.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ccca09a7ff92781a8c87ac4db345bae30c6bb0f09b4bfcba3e1bcdb63a566053
BLAKE2b-256 checksum
How to use checksums
3b4343c553de849393269cdb29d7f2e0ee033a411c8d7a95d365291109d57aa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.0 This release

4 release files

0.3.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page