skillfed

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.

yoto-api v4.3.4 74.8K downloads/30d#14,797 on PyPI55
Permissive license MIT license Active released

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-api

uv

uv add yoto-api

poetry

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 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

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

yoto player control apiasync yoto device clientyoto playback mqtt eventsyoto card library browseryoto player status monitoringyoto device automationyoto rest api wrapper
mqtt-eventshome-automationasync-client

More Internet packages