This release is a pre-release and may not be stable for production use.
music-assistant-plugin-manager
Ship a Music Assistant provider as a standalone pip package. No PR to the MA core repository is required.
MA requires all providers to live inside the server's music_assistant/providers/ directory. This library patches MA's provider discovery at runtime so that any pip-installable package registered under the music_assistant.provider entrypoint group is automatically found and loaded.
How it works
Two patches are applied before MA starts:
- Import hook (
MassProviderFinder): interceptsmusic_assistant.providers.<domain>imports and redirects them to the real plugin module. - Manifest patch: patches
MusicAssistant.__load_provider_manifeststo also injectmanifest.jsonfiles from entrypoint-registered packages.
A wrapper launcher applies both patches. Users run python -m music_assistant_plugin_manager (or the music-assistant-community script) instead of the normal MA entry point. This needs no .pth files and no edits to MA source.
Install
pip install music-assistant-plugin-manager
Requires Python >= 3.11 and a working Music Assistant installation.
Quick start
# Install your community provider alongside this library
pip install my-ma-provider
# Start Music Assistant through the wrapper
python -m music_assistant_plugin_manager
# or equivalently:
music-assistant-community
Docker
The recommended way to run community providers in a container is to extend the official MA server image.
Dockerfile (see examples/Dockerfile for a working copy):
FROM ghcr.io/music-assistant/server:beta
RUN /app/venv/bin/uv pip install --prerelease=allow music-assistant-plugin-manager
# For developing plugins, copy them into the image and install from the local checkout.
COPY ./examples/radiosoma_provider /build/radiosoma_provider
RUN /app/venv/bin/uv pip install --prerelease=allow /build/radiosoma_provider
RUN printf '%s\n' \
'#!/bin/sh' \
'for path in /usr/lib/*/libjemalloc.so.2; do' \
' [ -f "$path" ] && export LD_PRELOAD="$path" MALLOC_CONF="background_thread:true,dirty_decay_ms:5000,muzzy_decay_ms:5000" && break' \
'done' \
'exec /app/venv/bin/python -m music_assistant_plugin_manager "$@"' \
> /usr/local/bin/community-entrypoint.sh && chmod +x /usr/local/bin/community-entrypoint.sh
ENTRYPOINT ["/usr/local/bin/community-entrypoint.sh", "--data-dir", "/data", "--cache-dir", "/data/.cache"]
The entrypoint script is written by the RUN layer: overriding the base image's ENTRYPOINT drops the --data-dir/--cache-dir arguments it passed to mass, and without them MA stores its database inside the container and loses every setting on restart.
Note: the MA server image ships only uv inside the venv, not pip. Use /app/venv/bin/uv pip install.
docker-compose.yml (see examples/docker-compose.yml):
services:
music-assistant-server:
build:
context: .
dockerfile: Dockerfile
container_name: music-assistant-server
restart: always
network_mode: host
volumes:
- ${DATA_BASE_DIR}/music-assistant:/data/
environment:
LOG_LEVEL: info
See docs/deployment.md for a full compose snippet and local-run instructions.
Writing a provider plugin
Declare the entrypoint in your pyproject.toml:
[project.entry-points."music_assistant.provider"]
my_provider_domain = "my_provider_module"
Your module must contain:
| Item | Type | Description |
|---|---|---|
manifest.json |
file | MA provider manifest (domain, name, type, …) |
setup |
async def |
Instantiates and returns the provider |
setup_flow.py |
module | Optional. Collects one-time setup input (async def run_setup(session)) |
SUPPORTED_FEATURES |
set[ProviderFeature] |
Feature flags the provider advertises |
See docs/plugin-authors.md for the full guide, manifest field reference, and a worked example.
Examples
| Example | What it shows |
|---|---|
examples/demo_provider/ |
Minimal scaffold with no real functionality |
examples/radiosoma_provider/ |
Full MusicProvider subclass: SomaFM internet radio via stdlib XML + aiohttp, SEARCH and BROWSE features |
License
Apache 2.0
Metadata
Release files for music-assistant-plugin-manager 0.1.1a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| music_assistant_plugin_manager-0.1.1a4.tar.gz | 9.2 kB | Without provenance | Details for music_assistant_plugin_manager-0.1.1a4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| music_assistant_plugin_manager-0.1.1a4-py3-none-any.whl | Python 3 | none | any | Details for music_assistant_plugin_manager-0.1.1a4-py3-none-any.whl |
Total release size: 17.5 kB
Release files / music_assistant_plugin_manager-0.1.1a4.tar.gz
| Download URL | music_assistant_plugin_manager-0.1.1a4.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7825bdb0ff5d099fdd1197a5ce4cb97d6c0e57ef710f4e5f77084a51bf78f427
|
|
BLAKE2b-256 checksum How to use checksums |
a69afddcafb4be08e2d070c5edd097c25733f68ecf289cb85b35a95b9c533cb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / music_assistant_plugin_manager-0.1.1a4-py3-none-any.whl
| Download URL | music_assistant_plugin_manager-0.1.1a4-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8dd934d4cb93cca6aa27f9c4a25f68b417ab4dece4384f23efaeb3403f946c28
|
|
BLAKE2b-256 checksum How to use checksums |
ab1a334a34faed60c8277e4d6973af9b0dc06074b5fd61c659d0667d2439c36e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for music-assistant-plugin-manager 0.1.1a4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.