Skip to main content

Python module for controlling kodi over HTTP Json API

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kodi-json-1.0.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distributions

kodi_json-1.0.0-py3.5.egg (4.9 kB view details)

Uploaded Source

kodi_json-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

kodi_json-1.0.0-py2.py3-none-any.whl (3.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file kodi-json-1.0.0.tar.gz.

File metadata

  • Download URL: kodi-json-1.0.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kodi-json-1.0.0.tar.gz
Algorithm Hash digest
SHA256 151e5ffe5024742a1d190d4100cc3d40eade332f1887a7582f3c608ef0e42c65
MD5 91c967912041b141de0f7586a005ba86
BLAKE2b-256 cb2f34f9b4d54df7ee414b59c36a6e34394e045d27cea59746fa9209127b35c0

See more details on using hashes here.

File details

Details for the file kodi_json-1.0.0-py3.5.egg.

File metadata

File hashes

Hashes for kodi_json-1.0.0-py3.5.egg
Algorithm Hash digest
SHA256 98f6d28857fca9b375b9f841788ee8799f0c8134bc99b6c5345a3becfefb45fd
MD5 b8c61dd2cb5534ccabe7bb9333579a77
BLAKE2b-256 e48926cd7f5505a4d4ded2921363b460a3cec38e0da22051326a7d640c59c1f8

See more details on using hashes here.

File details

Details for the file kodi_json-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kodi_json-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 797a6f051760dcfc8872c6f18e31edaeae14800914c621fd742a724256b80e27
MD5 65338eeb2ad72bd99757bf37c515daca
BLAKE2b-256 65f70d35d79c3f3082742b2d3df707c5a48525791ee312420a6079e62b282dc5

See more details on using hashes here.

File details

Details for the file kodi_json-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for kodi_json-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ccca09a7ff92781a8c87ac4db345bae30c6bb0f09b4bfcba3e1bcdb63a566053
MD5 ecdd32ca1ccd419a34dca3ca178dd977
BLAKE2b-256 3b4343c553de849393269cdb29d7f2e0ee033a411c8d7a95d365291109d57aa4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page