Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

py-music-assistant

A Python HTTP client and mediavocab bridge for a Music Assistant server.

It is the single transport and 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. It has no WebSocket lifecycle. Item uri values are library://<type>/<id> identifiers. The ovos-media-plugin-mass backend resolves and plays these identifiers.

Docs

Tests

pip install -e .[test]
pytest test/                                   # unit + end2end, network-free (mocked + fixtures)
MASS_SERVER_URL=http://<host>:8095 pytest test/live/   # opt-in, against a real server

The end-to-end tests (test/end2end/) exercise the full round trip this library owns: HTTP transport, then the Music Assistant /api protocol, then the mediavocab bridge, then typed Release objects, all against a mocked server. This is a transport library with no skills and no message bus, so ovoscope end-to-end tests live in the consumers (ovos-media-plugin-mass, ovos-media-provider-mass, ovos-skill-music-assistant).

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_music_assistant-0.0.2a1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_music_assistant-0.0.2a1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file py_music_assistant-0.0.2a1.tar.gz.

File metadata

  • Download URL: py_music_assistant-0.0.2a1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for py_music_assistant-0.0.2a1.tar.gz
Algorithm Hash digest
SHA256 74212a5bf4dea3ab9543880b4b89043622b2f7c1ce762605769537d0fd202c13
MD5 67695637b96d6c649fb8184fcdd942c5
BLAKE2b-256 2d9a6d75bb71a03ce486cb536ea36f13862102df996871f8f630951e22f1e897

See more details on using hashes here.

File details

Details for the file py_music_assistant-0.0.2a1-py3-none-any.whl.

File metadata

File hashes

Hashes for py_music_assistant-0.0.2a1-py3-none-any.whl
Algorithm Hash digest
SHA256 64236e6aa68caeb84bbf8073c869d126251668d65a79e10b3edcc1c75e78c54a
MD5 0e4acc0cb925f99eb8be0c05bd8e2f15
BLAKE2b-256 27770145f8062a059fdb974534e63dec17c75deb452ce24ebbe2f9e0e849fa24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page