Getting python-musicpd
The latest release of python-musicpd can be found at http://pypi.python.org/pypi/python-musicpd.
Getting the latest source code
If you would instead like to use the latest source code, you can grab a copy of the development version from git by running the command:
git clone git://git.kaliko.me/python-musicpd.git
Installing from source
To install python-musicpd from source, simply run the command:
python3 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.
Using the client library
The client library can be used as follows:
client = musicpd.MPDClient() # create client object
client.connect('localhost', 6600) # connect to localhost:6600
print client.mpd_version # print the mpd version
print client.cmd('one', 2) # print result of the command "cmd one 2"
client.close() # send the close command
client.disconnect() # disconnect from the server
A list of supported commands, their arguments (as MPD currently understands them), and the functions used to parse their responses can be found in doc/commands.txt. See the MPD protocol documentation for more details.
Command lists are also supported using command_list_ok_begin() and command_list_end()
client.command_list_ok_begin() # start a command list client.update() # insert the update command into the list client.status() # insert the status command into the list results = client.command_list_end() # results will be a list with the results
Commands may also return iterators instead of lists if iterate is set to True:
client.iterate = True
for song in client.playlistinfo():
print song['file']
Metadata
Release files for python-musicpd 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | |
|---|---|---|---|
| python-musicpd-0.4.0.zip | 25.1 kB | Details | |
| python-musicpd-0.4.0.tar.gz | 21.4 kB | Details | |
| python-musicpd-0.4.0.tar.bz2 | 19.5 kB | Details |
Release files / python-musicpd-0.4.0.zip
| Download URL | python-musicpd-0.4.0.zip |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65403ed576e2964d0e3a3f881c413868b09b0ab97a93decfa0410a7c689244eb
|
|
BLAKE2b-256 checksum How to use checksums |
9da7b91023d324f1a4de465f189957de7327f2d0e296405f29b2e056ce260882
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python-musicpd-0.4.0.tar.gz
| Download URL | python-musicpd-0.4.0.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f89f956487c8fff837a35f1d331f02cb9d660bab51eaf8b6a69f15442e2672b
|
|
BLAKE2b-256 checksum How to use checksums |
5f4cafd52a760dc4f619e53bca9a023a25c63f7ded07c8d8591e6be92348762a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python-musicpd-0.4.0.tar.bz2
| Download URL | python-musicpd-0.4.0.tar.bz2 |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3846b8b233ce1a672e2a34cd43628d4fe8e9932b6444b83e68a7cedfb3d8d0d6
|
|
BLAKE2b-256 checksum How to use checksums |
5082404b84349c4e61600148980dc0435ff99382ad8b9294a7140d2c6d96313a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |