Skip to main content

Python client for Kodi server

Project description

Python client for Kodi Server API

License: MIT PyPI - Python Version

Author Denis Machard d.machard@gmail.com
License MIT
PyPI https://pypi.org/project/kodi-remotecontrol/

This is a Python remote control for Kodi Server through the JSON-RPC HTTP or the Event Server API with minimal but sufficient basic controls.

Table of contents

Installation

pip install kodi_remotecontrol

Remote control

HTTP client

As prerequisite, go to System/Settings/Network/Services and activate Allow control of Kodi via HTTP.

from kodi_remotecontrol import HttpClient

# prepare remote control
kodi_ip = "10.0.0.200"
api_rc = HttpClient(api_host=kodi_ip)

Event client

As prerequisite, go to 'System/Settings/Network/Services' and activate Allow programs on other systems to control Kodi.

from kodi_remotecontrol import EventClient

# prepare remote control
kodi_ip = "10.0.0.200"
api_rc = EventClient(api_host=kodi_ip)

UI navigation

from kodi_remotecontrol import Navigation

# prepare remote control
kodi_ip = "10.0.0.200"
api_rc = EventClient(api_host=kodi_ip)

# ui navigation
nav = Navigation(api_rc=api_rc)
nav.press_enter()
Buttons Description
press_up() UP button
press_down() DOWN button
press_left() LEFT button
press_right() RIGHT button
press_back() BACK button
press_enter() ENTER button
press_contextmenu() CONTEXT MENU button

Player interaction

from kodi_remotecontrol import Player

# prepare remote control
kodi_ip = "10.0.0.200"
api_rc = EventClient(api_host=kodi_ip)

# player interaction
nav = Player(api_rc=api_rc)
nav.press_play()
Buttons Description
press_play() PLAY button
press_stop() STOP button
press_pause() PAUSE button
press_shuffle() SHUFFLE button
press_previous() PREVIOUS button
press_next() NEXT button
press_info() INFO button

Subtitle selection

from kodi_remotecontrol import Subtitle

# prepare remote control
kodi_ip = "10.0.0.200"
api_rc = EventClient(api_host=kodi_ip)

# subtitle selection
sub = Subtitle(api_rc=api_rc)
sub.press_show()
Buttons Description
press_show() SHOW button
select_next() NEXT button

Audio track selection

from kodi_remotecontrol import Audio

# prepare remote control
kodi_ip = "10.0.0.200"
api_rc = EventClient(api_host=kodi_ip)

# audio track selection
aud = Audio(api_rc=api_rc)
aud.select_next()
Buttons Description
select_next() NEXT button

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_remotecontrol-0.2.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

kodi_remotecontrol-0.2.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file kodi_remotecontrol-0.2.0.tar.gz.

File metadata

  • Download URL: kodi_remotecontrol-0.2.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for kodi_remotecontrol-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5c77ecd7774ea023f5a1a795d07ca70018c675f8bdd6a7245516eb2560b50020
MD5 0bdccc8db98c8120ac1140a8cc74cabc
BLAKE2b-256 0bcf501926d0adef7e7871e243aaf999c100c0edfbd15eee7b198433b09b52ef

See more details on using hashes here.

File details

Details for the file kodi_remotecontrol-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: kodi_remotecontrol-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for kodi_remotecontrol-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f6a173229b8190cf50c5968547b2059bfe54c250c15d5fd172e2e5186d67a93
MD5 e8b16fdbf6591a8e5d6c2946928ec423
BLAKE2b-256 b9d18bb0f472d0ce2a901c38abc395e389fffa70822bda1454441f2cbcc86bb4

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