--- id: yoto-api version: "4.3.4" license: MIT license license_treatment: permissive maintenance: active --- # yoto-api — A python package that makes it a bit easier to work with the yoto play API. Not associated with Yoto in any way. License: permissive · Maintenance: active · Downloads: 74.8K/mo ## What it is and what it does yoto_api is an async Python wrapper around the Yoto player API that lets you programmatically control Yoto devices, query their state, and react to live playback events over MQTT. It abstracts the REST endpoints (device discovery, configuration, library browsing) and MQTT event stream into a single client interface, organizing player data into typed sub-objects (device identity, settings, battery/volume status, playback state, online presence). The package is built on aiohttp and aiomqtt, making it suitable for async applications like Home Assistant integrations or event-driven automation. It handles OAuth device-code flow for initial authentication, token refresh, and supports both one-shot REST snapshots and live MQTT subscriptions. All methods are async, and error handling is granular (AuthenticationError, YotoAPIError, YotoMQTTError). Use it for: - Integrate Yoto players into a Home Assistant or other home automation system for voice control and playback automation. - Build a dashboard or monitoring tool that displays real-time playback state and battery levels across multiple Yoto devices. - Automate bedtime routines by triggering playback of specific cards on Yoto players at scheduled times. - React to live MQTT events to log playback history or trigger downstream actions when a player starts or stops. - Manage card library and groups programmatically, organizing content across multiple devices. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Async Python client for controlling Yoto player devices via REST API and MQTT, including playback control, device status monitoring, and card library browsing. Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It fills a clear gap for developers wanting to automate Yoto devices. Pre-Alpha status reflects the API's maturity rather than code quality; recent activity and 55 GitHub stars suggest it is stable enough for production use. Install if you own Yoto hardware and need programmatic control. ## Install pip install yoto-api uv add yoto-api poetry add yoto-api ## Installing yoto-api Before you install: Low install friction; pure Python wheel with two async dependencies (aiohttp, aiomqtt). Active maintenance with a recent release and no known vulnerabilities. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most projects. Quickstart: import asyncio from yoto_api import YotoClient async def main(): async with YotoClient(client_id="your_client_id") as client: auth = await client.device_code_flow_start() print(auth["verification_uri_complete"]) await client.device_code_flow_complete(auth) await client.refresh() for pid, player in client.players.items(): print(pid, player.device.name) asyncio.run(main()) Requires a Yoto client ID from https://yoto.dev/get-started/start-here/ and Python 3.10 or later. Verify before relying: - Whether the package handles reconnection and session recovery automatically on network interruption. - Performance characteristics when managing multiple players or high-frequency MQTT event streams. - Completeness of extended_status field coverage across all Yoto device families. ## Package facts - License: MIT license (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 74.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags yoto player control api, async yoto device client, yoto playback mqtt events, yoto card library browser, yoto player status monitoring, yoto device automation, yoto rest api wrapper, mqtt-events, home-automation, async-client [View on SkillFed](https://skillfed.io/packages/yoto-api) · [View on PyPI](https://pypi.org/project/yoto-api/)