Python HTTP client and mediavocab bridge for a Music Assistant server
Project description
py-music-assistant
Python HTTP client and mediavocab bridge for a Music Assistant server.
It is the single transport + conversion layer shared by the OVOS Music Assistant integrations:
- ovos-media-plugin-mass — playback backend (
opm.media.audio) - ovos-media-provider-mass — catalog/search provider (
opm.media.provider) - ovos-skill-music-assistant — legacy OCP search skill
Install
pip install py-music-assistant
Usage
from py_music_assistant import SimpleHTTPMusicAssistantClient, search_to_releases
api = SimpleHTTPMusicAssistantClient("http://192.168.1.100:8095")
# raw search (dict of buckets: tracks/albums/artists/radio/podcasts/audiobooks)
res = api.search_media("viagra boys", limit=10)
# mapped to typed mediavocab.Release objects (unranked; score them yourself)
releases = search_to_releases(res)
for r in releases:
print(r.work.title, r.work.media_type, r.uri) # e.g. "Worms" MUSIC library://track/9903
The client talks to the server's synchronous JSON /api endpoint (no WebSocket
lifecycle). Item uris are library://<type>/<id> identifiers that the
ovos-media-plugin-mass backend resolves and plays.
Docs
- docs/index.md — overview
- docs/client-api.md —
SimpleHTTPMusicAssistantClientreference - docs/mediavocab-bridge.md — dict →
Releasemapping
Tests
pip install -e .[test]
pytest test/ # network-free (mocked + fixtures)
MASS_SERVER_URL=http://<host>:8095 pytest test/live/ # opt-in, against a real server
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_music_assistant-0.0.1.tar.gz.
File metadata
- Download URL: py_music_assistant-0.0.1.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a618f83c5fb6283c1b46bf25ae3e175ef043c2dbdce4aaaa7739d5fcae613d8b
|
|
| MD5 |
7ce8bbca06c6d4d012f9df1110aa3578
|
|
| BLAKE2b-256 |
828c7ec3a865301725064857e31c1fc4445ed7941586edb889b0458256914988
|
File details
Details for the file py_music_assistant-0.0.1-py3-none-any.whl.
File metadata
- Download URL: py_music_assistant-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5d41c17135db68cfc086b6ca171aa0d75dc96b4aa744c0f10dfd204719f1741
|
|
| MD5 |
3d6e34eaee9cedc24ac60c9ae6b52411
|
|
| BLAKE2b-256 |
8a5222696d5fd7070a6a16ef50a3b0f81df6ef55c6e50a1c2b71fe8b6812bdae
|