Skip to main content

codecov ci

aiowebostv

Python library to control LG webOS based TV devices.

Based on:

Requirements

  • Python >= 3.12

Install

pip install aiowebostv

Install from Source

Run the following command inside this folder

pip install --upgrade .

Prepare the development environment

Run the following commands inside this folder (requires uv)

uv sync --all-groups
uv run prek install

Run all checks (lint, type checking and tests) with

uv run tox

Examples

Basic Example

import asyncio
from pprint import pprint

from aiowebostv import WebOsClient

HOST = "192.168.1.39"
# For first time pairing set key to None
CLIENT_KEY = "140cce792ae045920e14da4daa414582"


async def main():
    """Basic webOS client example."""

    client = WebOsClient(HOST, CLIENT_KEY)
    await client.connect()

    # Store this key for future use
    print(f"Client key: {client.client_key}")

    pprint(client.tv_info)
    pprint(client.tv_state)

    await client.disconnect()


if __name__ == "__main__":
    asyncio.run(main())

Subscribed State Updates Example

import asyncio
import dataclasses
import signal
from datetime import UTC, datetime
from pprint import pprint

from aiowebostv import WebOsClient
from aiowebostv.models import WebOsTvState

HOST = "192.168.1.39"
# For first time pairing set key to None
CLIENT_KEY = "140cce792ae045920e14da4daa414582"


async def on_state_change(tv_state: WebOsTvState) -> None:
    """State changed callback."""
    now = datetime.now(UTC).astimezone().strftime("%H:%M:%S.%f")[:-3]
    print(f"[{now}] State change:")
    # for the example, remove apps and inputs to make the output more readable
    state = dataclasses.replace(tv_state, apps={}, inputs={})
    pprint(state)


async def main():
    """Subscribed State Updates Example."""
    client = WebOsClient(HOST, CLIENT_KEY)
    await client.register_state_update_callback(on_state_change)
    await client.connect()

    # Store this key for future use
    print(f"Client key: {client.client_key}")

    # Change something using the remote to get updates or ctrl-c to exit
    sig_event = asyncio.Event()
    signal.signal(signal.SIGINT, lambda _exit_code, _frame: sig_event.set())
    await sig_event.wait()

    await client.disconnect()


if __name__ == "__main__":
    asyncio.run(main())

Examples can be found in the examples folder

Metadata

Release files for aiowebostv 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 aiowebostv 1.0.0
File Size Uploaded Provenance Actions
aiowebostv-1.0.0.tar.gz 27.1 kB With provenance Details for aiowebostv-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiowebostv 1.0.0
File Interpreter ABI Platform Actions
aiowebostv-1.0.0-py3-none-any.whl Python 3 none any Details for aiowebostv-1.0.0-py3-none-any.whl

Total release size: 46.7 kB

Release files / aiowebostv-1.0.0.tar.gz

Download URL aiowebostv-1.0.0.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3f51a03ed00d9f0a1acfc82ee254484fe33d29f01dd4ea05662cdc249f5f1ac3
BLAKE2b-256 checksum
How to use checksums
c9631884109cd8771c459e38a8ce0a805abdc45a7dd415a068f3de3e676f1093
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

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

Download URL aiowebostv-1.0.0-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf092a223ea018a8dde639a96f7e14fde1555a4a41d643c7edeaaebb396574e5
BLAKE2b-256 checksum
How to use checksums
79235568487ed736e5f1c7c208d829d6c97ae2963fe3f14e042aaac43bcb48ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for aiowebostv 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiowebostv-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

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