--- id: python-mpd2 version: "3.1.1" license: GNU Lesser General Public License v3 (LGPLv3) license_treatment: copyleft maintenance: active --- # python-mpd2 — A Python MPD client library License: copyleft · Maintenance: active · Downloads: 120.9K/mo ## What it is and what it does python-mpd2 is a Python client library for Music Player Daemon (MPD), a lightweight music server. It lets you control MPD playback, manage playlists, and query server state from Python code. The library supports both synchronous blocking calls and asynchronous patterns via asyncio or twisted, making it suitable for simple scripts, web applications, and event-driven systems. The package started as a fork of python-mpd and has evolved to support Python 3.6+, client-to-client protocol messaging, and newer MPD commands including seekcur, prio, config, mount, and others. It includes explicit command declarations for IDE autocomplete, configurable connection timeouts, logging support, and improved Unicode handling. With zero runtime dependencies and a pure-Python wheel, it installs quickly and runs anywhere Python 3.6+ is available. Use it for: - Build a web dashboard or REST API to control MPD playback and queue from a browser. - Write a command-line tool to automate playlist management and music library operations. - Create a home automation script that integrates MPD with other services via asyncio. - Develop a music client application with custom UI that talks to a remote MPD server. - Monitor and log MPD server state and playback events for analytics or debugging. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a Python client library to communicate with Music Player Daemon (MPD) servers, supporting both synchronous and asynchronous operations. Yes. This is a mature, actively maintained library with zero dependencies, a permissive copyleft license, and no known vulnerabilities. Install it if you need to control MPD from Python—whether for a simple script, web service, or async application. The only prerequisite is having an MPD server running; the library itself is straightforward to integrate. ## Install pip install python-mpd2 uv add python-mpd2 poetry add python-mpd2 ## Installing python-mpd2 Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits; last release was 2024-01-13 and repository shows ongoing development. License in practice: LGPLv3 copyleft license: you may use this library freely in proprietary software, but any modifications to the library itself must be released under the same license. Quickstart: pip install python-mpd2 import python_mpd2 client = python_mpd2.MPDClient() client.connect('localhost') status = client.status() client.close() Requires Python 3.6 or later and a running Music Player Daemon server to connect to. Verify before relying: - Whether asyncio/twisted support is production-ready or still experimental. - Performance characteristics when controlling large playlists or music libraries. - Compatibility matrix with specific MPD server versions. - Default port and connection parameters for MPD server connections. ## Package facts - License: GNU Lesser General Public License v3 (LGPLv3) (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 120.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mpd client library python, music player daemon client, asyncio mpd control, python mpd interface, twisted mpd support, music-server, asyncio-ready [View on SkillFed](https://skillfed.io/packages/python-mpd2) · [View on PyPI](https://pypi.org/project/python-mpd2/)