pykodi
An async python interface for Kodi over JSON-RPC.
What it is and what it does
PyKodi is an async Python client library for controlling Kodi media centers remotely via JSON-RPC. It abstracts the JSON-RPC protocol into a Python API, allowing you to send commands (play, pause, volume control) and query properties (application name, version) from your own Python code. The library supports both HTTP and WebSocket transports and is built on aiohttp, jsonrpc-async, and jsonrpc-websocket for non-blocking I/O.
The package was designed primarily for integration with HomeAssistant but can be used standalone to automate or monitor Kodi instances. It requires Python 3.7 or above and handles connection setup, session management, and async communication internally. The API is straightforward: create a connection, connect asynchronously, wrap it in a Kodi object, and call methods like ping(), play(), pause(), or get_application_properties().
Use it for:
- Integrate Kodi playback control into a HomeAssistant automation or dashboard.
- Build a custom remote control application that sends play/pause/volume commands to Kodi over the network.
- Query Kodi application properties or media state from a monitoring or logging script.
- Automate media playback sequences across multiple Kodi instances in a home network.
- Develop a lightweight CLI tool to control Kodi without a web browser or official remote.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyKodi provides an async Python interface to control Kodi media centers remotely over JSON-RPC, supporting both HTTP and WebSocket connections.
Yes, if you need to control Kodi from Python and are willing to accept that the package has not been updated since October 2021. Install friction is low and the MIT license is unencumbered. Verify compatibility with your Kodi version and HomeAssistant version (if applicable) before relying on it in production.
Install
pykodi on PyPI
pip
pip install pykodiuv
uv add pykodipoetry
poetry add pykodiInstalling pykodi
Before you install
Low install friction with pure-Python dependencies. Maintenance is active with recent commits, though the latest release is from October 2021.
License in practice
MIT license is permissive and imposes no significant restrictions on use, modification, or distribution.
Quickstart
pip install pykodi
from pykodi import get_kodi_connection, Kodi
kc = get_kodi_connection(host, port, ws_port, ssl, timeout, session, user, password)
await kc.connect()
kodi = Kodi(kc)
await kodi.ping()
Requires Python 3.7 or above; async/await syntax requires an event loop context.
Verify before relying
- Whether the package remains compatible with modern Kodi versions beyond its last release in October 2021.
- Whether HomeAssistant integration (its primary design target) continues to work with current versions.
- Active maintenance status despite recent commits—whether the repository is accepting contributions or in maintenance-only mode.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — jsonrpc-async, jsonrpc-websocket, aiohttp |
| Maintenance | actively maintained — 1,756 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 73,731/month — #14,938 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pykodi-0.2.7-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
github-copilot-sdkPython SDK for programmatic control of GitHub…
permissive · top 5,000 on PyPI
samsungtvwsA Python library for remotely controlling…
copyleft · top 15,000 on PyPI
transmission-rpcPython wrapper around the Transmission…
permissive · top 15,000 on PyPI
jellyfin-apiclient-pythonPython client library for interacting with…
copyleft · top 15,000 on PyPI
jsonrpcclientGenerates JSON-RPC request objects and parses…
unclear · top 15,000 on PyPI
jupyter-kernel-clientConnects to live Jupyter Kernels over HTTP and…
permissive · top 15,000 on PyPI
ajsonrpcImplements the JSON-RPC 2.0 protocol with an…
permissive · top 5,000 on PyPI
plexwebsocketAsync library that connects to Plex media…
permissive · top 15,000 on PyPI
ovsProvides official Python bindings for Open…
permissive · top 15,000 on PyPI
pyps4-2ndscreenUnofficial Python library to control…
copyleft · top 15,000 on PyPI