An async python interface for Kodi over JSON-RPC.
Project description
PyKodi
An async python interface for Kodi over JSON-RPC. This is mostly designed to integrate with HomeAssistant. If you have other needs, there might be better packages available.
Installation
You can install PyKodi from PyPI:
pip3 install pykodi
Python 3.7 and above are supported.
How to use
from pykodi import get_kodi_connection, Kodi
kc = get_kodi_connection(<host>, <port>, <ws_port>, <username>, <password>, <ssl>, <timeout>, <session>)
# if ws_port is None the connection will be over HTTP, otherwise over WebSocket.
# ssl defaults to False (only relevant if you have a proxy), timeout to 5 (seconds)
# session is generated if not passed in
# you can also pass in your own session
await kc.connect()
kodi = Kodi(kc)
await kodi.ping()
properties = await kodi.get_application_properties(["name", "version"])
await kodi.play()
await kodi.volume_up()
await kodi.pause()
...
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
pykodi-0.2.7.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file pykodi-0.2.7.tar.gz
.
File metadata
- Download URL: pykodi-0.2.7.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9f1646d967745732895a686a64bef55f498b4d341d5b4eca110a29f71a754a3 |
|
MD5 | 434716ac2f5eacfc43a86905e6a6649a |
|
BLAKE2b-256 | a3a93dfebd3cd15b7119b89a6b5b6e7382feef14118fb4a38aa918fd8d9fbffd |
File details
Details for the file pykodi-0.2.7-py3-none-any.whl
.
File metadata
- Download URL: pykodi-0.2.7-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ff58f1357bd352974bde4bfbb91b01f0ec09716969b9791181148bbad291d9b |
|
MD5 | d47dd655cb5220525446492dd30d7851 |
|
BLAKE2b-256 | 7812330fdccb50d655547db2dbb98c97f2a593b75aa5d48d521a2b9a70d807bf |