Skip to main content

A Python MPD client library

Project description

Build Status

python-mpd2 is a Python library which provides a client interface for the Music Player Daemon.

Difference with python-mpd

python-mpd2 is a fork of python-mpd. While 0.4.x was backwards compatible with python-mpd, starting with 0.5 provides enhanced features which are NOT backward compatibles with the original python-mpd package. (see PORTING.txt for more information)

The following features were added:

  • Python 3 support (but you need at least Python 3.6)

  • asyncio/twisted support

  • support for the client-to-client protocol

  • support for new commands from MPD (seekcur, prio, prioid, config, searchadd, searchaddpl, listfiles, rangeid, addtagid, cleartagid, mount, umount, listmounts, listneighbors)

  • remove deprecated commands (volume)

  • explicitly declared MPD commands (which is handy when using for example IPython)

  • a test suite

  • API documentation to add new commands (see Future Compatible)

  • support for Unicode strings in all commands (optionally in python2, default in python3 - see Unicode Handling)

  • configureable timeouts

  • support for logging

  • improved support for sticker

  • improved support for ranges

Getting the latest source code

If you would like to use the latest source code, you can grab a copy of the development version from Git by running the command:

$ git clone https://github.com/Mic92/python-mpd2.git

Getting the latest release

The latest stable release of python-mpd2 can be found on PyPI

PyPI:

$ pip install python-mpd2

Installation in Linux/BSD distributions

Until Linux distributions adapt this package, here are some ready to use packages to test your applications:

See INSTALL.rst

Installing from source

To install python-mpd2 from source, simply run the command:

$ python setup.py install

You can use the –help switch to setup.py for a complete list of commands and their options. See the Installing Python Modules document for more details.

Documentation

Documentation

Getting Started

Command Reference

Examples

Testing

Just run:

$ python setup.py test

This will install Tox. Tox will take care of testing against all the supported Python versions (at least available) on our computer, with the required dependencies

If you have nix, you can also use the provided default.nix to bring all supported python versions in scope using nix-shell. In that case run tox directly instead of using setup.py:

$ nix-shell --command 'tox'

Building Documentation

Install Sphinx:

$ easy_install -U Sphinx

Change to the source directory and run:

$ python ./setup.py build_sphinx

The command reference is generated from the official mpd protocol documentation. In order to update it, install python-lxml and run the following command:

$ python ./doc/generate_command_reference.py > ./doc/topics/commands.rst

Contacting the author

Just contact me (Mic92) on Github or via email (joerg@thalheim.io).

Project details


Download files

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

Source Distribution

python-mpd2-2.0.0.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

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

python_mpd2-2.0.0-py2.py3-none-any.whl (29.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file python-mpd2-2.0.0.tar.gz.

File metadata

  • Download URL: python-mpd2-2.0.0.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20201111 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

File hashes

Hashes for python-mpd2-2.0.0.tar.gz
Algorithm Hash digest
SHA256 5d0dac5d0d15aa5345aa6cefb4b793b83811926a155993c10829c48166553576
MD5 5dbf2fc85b6fa7c632570faad9d0d967
BLAKE2b-256 c92ea5c36479708d9f80db632a4a9c3c8bf371c200152a318eb3daf81b86e906

See more details on using hashes here.

File details

Details for the file python_mpd2-2.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: python_mpd2-2.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20201111 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

File hashes

Hashes for python_mpd2-2.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 71b2d21dba6ab8e2e6cda4d1f6294b1adeb456f8c2e7c41b1438aa8ad30c4774
MD5 cf8bf75d33961f043f6f15fa51715178
BLAKE2b-256 69e00743be217a821a311f1bf8ace278ea2e67f42f1550dab0dde387e41f1452

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 Pingdom Monitoring Sentry Error logging StatusPage Status page