Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Recommend IPython and clarify async REPL usage

Update README examples to IPython prompt/output format, add
python -m asyncio guidance for the stdlib REPL, and note that
subscriptions fire in both REPLs.
Recommend IPython and clarify async REPL usage

+32 -27
+30 -25
sdk/python/README.md
··· 1 1 # rockbox-sdk 2 2 3 - Async Python SDK for [Rockbox](https://www.rockbox.org) — a typed, batteries-included 3 + Async Python SDK for [Rockbox Zig](https://github.com/tsirysndr/rockbox-zig) — a typed, batteries-included 4 4 client for the GraphQL API exposed by `rockboxd`. 5 5 6 6 ```python ··· 41 41 42 42 ## Try it in the REPL 43 43 44 - The SDK is async-first, so the easiest way to poke at a live `rockboxd` is 45 - Python's built-in async REPL — `await` works at the top level: 44 + The SDK is async-first. The recommended REPL is **IPython** — `await` works at 45 + the top level, and you get tab-completion on models, inline docs with `?`, and 46 + `%timeit` for benchmarking: 46 47 47 48 ```sh 48 - uv run python -m asyncio 49 + uv run ipython 49 50 ``` 50 51 51 52 ```python 52 - >>> from rockbox_sdk import RockboxClient, PlaybackStatus 53 - >>> client = RockboxClient(host="localhost", port=6062) 54 - >>> await client.playback.status() 55 - <PlaybackStatus.PLAYING: 1> 56 - >>> track = await client.playback.current_track() 57 - >>> track.title, track.artist 58 - ('Money', 'Pink Floyd') 59 - >>> await client.sound.get_volume() 60 - VolumeInfo(volume=-12, min=-74, max=6) 61 - >>> await client.library.search("daft punk") 62 - >>> await client.aclose() 53 + In [1]: from rockbox_sdk import RockboxClient, PlaybackStatus 54 + In [2]: client = RockboxClient(host="localhost", port=6062) 55 + In [3]: await client.playback.status() 56 + Out[3]: <PlaybackStatus.PLAYING: 1> 57 + In [4]: track = await client.playback.current_track() 58 + In [5]: track.title, track.artist 59 + Out[5]: ('Money', 'Pink Floyd') 60 + In [6]: await client.sound.get_volume() 61 + Out[6]: VolumeInfo(volume=-12, min=-74, max=6) 62 + In [7]: await client.library.search("daft punk") 63 + In [8]: await client.aclose() 63 64 ``` 64 65 65 66 You can also test offline — models, enums, and the builder don't need a server: 66 67 67 68 ```python 68 - >>> from rockbox_sdk import RockboxClient, Track, InsertPosition 69 - >>> Track.model_validate({"title": "Money", "albumArt": "x.jpg"}).album_art 70 - 'x.jpg' 71 - >>> RockboxClient.builder().host("nas.local").build()._config.resolve_http_url() 72 - 'http://nas.local:6062/graphql' 69 + In [1]: from rockbox_sdk import RockboxClient, Track, InsertPosition 70 + In [2]: Track.model_validate({"title": "Money", "albumArt": "x.jpg"}).album_art 71 + Out[2]: 'x.jpg' 72 + In [3]: RockboxClient.builder().host("nas.local").build()._config.resolve_http_url() 73 + Out[3]: 'http://nas.local:6062/graphql' 73 74 ``` 74 75 75 - If you'd rather use the plain `python` REPL, wrap each call in `asyncio.run(...)`: 76 + If you prefer the stdlib REPL, `python -m asyncio` also supports top-level 77 + `await`, or wrap each call in `asyncio.run(...)` in a plain `python` session: 78 + 79 + ```sh 80 + uv run python -m asyncio 81 + ``` 76 82 77 83 ```python 78 - >>> import asyncio 79 84 >>> from rockbox_sdk import RockboxClient 80 85 >>> client = RockboxClient() 81 - >>> asyncio.run(client.playback.status()) 86 + >>> await client.playback.status() 82 87 ``` 83 88 84 - The async REPL is much nicer — subscriptions (`await client.connect()`) also keep 85 - firing in the background between prompts. 89 + Subscriptions (`await client.connect()`) keep firing in the background between 90 + prompts in both REPLs. 86 91 87 92 ## Configure 88 93
+1 -1
sdk/ruby/README.md
··· 1 1 # rockbox 2 2 3 - Ruby SDK for [Rockbox](https://www.rockbox.org) — a builder-friendly, block-friendly GraphQL client with real-time event subscriptions and a plugin system. 3 + Ruby SDK for [Rockbox Zig](https://github.com/tsirysndr/rockbox-zig) — a builder-friendly, block-friendly GraphQL client with real-time event subscriptions and a plugin system. 4 4 5 5 ```ruby 6 6 require "rockbox"
+1 -1
sdk/typescript/README.md
··· 1 1 # @rockbox-zig/sdk 2 2 3 - TypeScript SDK for [Rockbox](https://www.rockbox.org) — a fully typed GraphQL client with real-time subscriptions and a plugin system. 3 + TypeScript SDK for [Rockbox Zig](https://github.com/tsirysndr/rockbox-zig) — a fully typed GraphQL client with real-time subscriptions and a plugin system. 4 4 5 5 ## Table of contents 6 6