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.
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 on this page — 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
yoto-api on PyPI
pip
pip install yoto-apiuv
uv add yoto-apipoetry
poetry add yoto-apiInstalling 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 the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aiohttp, aiomqtt |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,763/month — #14,797 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: yoto_api-4.3.4-py3-none-any.whl
Keywords: yoto_api
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
pybluControl and query BluOS audio players over the…
permissive · top 15,000 on PyPI
hyperion-pyA Python async client library for controlling…
permissive · top 15,000 on PyPI
elgatoAsynchronous Python client for controlling and…
permissive · top 15,000 on PyPI
aiotractiveAsynchronous Python client for the Tractive pet…
permissive · top 15,000 on PyPI
tb-mqtt-clientPython client SDK for ThingsBoard IoT platform,…
permissive · top 15,000 on PyPI
sonos-websocketAsync Python library for communicating with…
permissive · top 15,000 on PyPI
aioslimprotoAsync Python implementation of the SLIMProto…
permissive · top 15,000 on PyPI
pyobjc-framework-MediaPlayerProvides Python bindings to macOS's MediaPlayer…
permissive · top 15,000 on PyPI
aiomqttAn asyncio-native MQTT client that wraps…
permissive · top 5,000 on PyPI
asyncio-mqttProvides an async/await interface to MQTT…
permissive · top 15,000 on PyPI