Skip to main content

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:

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

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

Metadata

Release files for py-music-assistant 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-music-assistant 0.0.1
File Size Uploaded
py_music_assistant-0.0.1.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-music-assistant 0.0.1
File Interpreter ABI Platform
py_music_assistant-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.6 kB

Release files / py_music_assistant-0.0.1.tar.gz

Download URL py_music_assistant-0.0.1.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a618f83c5fb6283c1b46bf25ae3e175ef043c2dbdce4aaaa7739d5fcae613d8b
BLAKE2b-256 checksum
How to use checksums
828c7ec3a865301725064857e31c1fc4445ed7941586edb889b0458256914988
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / py_music_assistant-0.0.1-py3-none-any.whl

Download URL py_music_assistant-0.0.1-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5d41c17135db68cfc086b6ca171aa0d75dc96b4aa744c0f10dfd204719f1741
BLAKE2b-256 checksum
How to use checksums
8a5222696d5fd7070a6a16ef50a3b0f81df6ef55c6e50a1c2b71fe8b6812bdae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page