--- id: music-assistant-client version: "1.5.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # music-assistant-client — Music Assistant Client License: permissive · Maintenance: active · Downloads: 207.5K/mo ## What it is and what it does Music Assistant Client is an async Python library that acts as a remote control for Music Assistant Server, a music management and playback system. It provides authenticated connections to the server's REST API, allowing you to browse music libraries, search for tracks and artists, control playback on multiple players, manage queues, and subscribe to real-time server events. The library handles authentication via long-lived tokens (recommended for production) or temporary access tokens, with automatic schema version detection for backward compatibility with older servers that don't require authentication. The client is built on aiohttp for async HTTP communication and uses orjson for efficient JSON parsing. It exposes controllers for authentication management, music library operations, player control, queue management, and server configuration. It supports both HTTP and HTTPS connections, including custom SSL contexts for self-signed certificates. The library is actively maintained and targets modern Python versions (3.12+), making it suitable for building music control applications, home automation integrations, or remote management tools. Use it for: - Build a custom web dashboard or mobile app to browse and control music playback on your Music Assistant Server instance. - Integrate Music Assistant into home automation workflows to play specific playlists or artists on demand. - Create a command-line tool to remotely manage music libraries, search for tracks, and queue songs across multiple players. - Subscribe to server events to trigger actions when playback starts, stops, or changes (e.g., logging, notifications). - Develop a multi-room audio controller that manages playback synchronization across several players in different zones. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python async client library for connecting to and controlling Music Assistant Server instances via their REST API, with support for authentication, music library browsing, player control, and event subscriptions. Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. Install it if you need to programmatically control a Music Assistant Server instance from Python—particularly for automation, dashboards, or multi-player coordination. Ensure your Music Assistant Server is running and you have a valid authentication token before connecting. ## Install pip install music-assistant-client uv add music-assistant-client poetry add music-assistant-client ## Installing music-assistant-client Before you install: Low install friction with only three runtime dependencies (aiohttp, music_assistant_models, orjson). Actively maintained with a recent release; requires Python 3.12 or later. License in practice: Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions beyond attribution and liability disclaimers. Quickstart: pip install music-assistant-client from music_assistant_client import login_with_token, MusicAssistantClient import asyncio async def main(): user, token = await login_with_token( "http://localhost:8095", "username", "password" ) async with MusicAssistantClient("http://localhost:8095", None, token=token) as client: await client.start_listening() asyncio.run(main()) Requires Python 3.12+; Music Assistant Server instance must be running and accessible at the specified URL; authentication token required for server schema version 28 and above. Verify before relying: - Whether the client supports all Music Assistant Server versions or only recent ones beyond schema 28. - Performance characteristics when handling large music libraries or high-frequency event subscriptions. - Whether SSL context customization works with all certificate types mentioned in the documentation. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 207.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags music assistant server client, async music player control, music library api client, music assistant python, music streaming client library, rest api music control, async music management, music-streaming, async-client, home-automation [View on SkillFed](https://skillfed.io/packages/music-assistant-client) · [View on PyPI](https://pypi.org/project/music-assistant-client/)