python-musicpd 0.9.0__tar.gz → 0.9.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/CHANGES.txt +17 -0
  2. python_musicpd-0.9.2/PKG-INFO +34 -0
  3. python_musicpd-0.9.2/doc/source/_commands.rst +204 -0
  4. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/commands.rst +2 -4
  5. {python-musicpd-0.9.0 → python_musicpd-0.9.2/doc/source/examples}/musicpd.py +27 -15
  6. python_musicpd-0.9.2/doc/source/python-musicpd.svg +1417 -0
  7. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/use.rst +3 -1
  8. python_musicpd-0.9.2/musicpd.py +822 -0
  9. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/pyproject.toml +3 -3
  10. python_musicpd-0.9.2/python_musicpd.egg-info/PKG-INFO +34 -0
  11. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/python_musicpd.egg-info/SOURCES.txt +3 -0
  12. python-musicpd-0.9.0/PKG-INFO +0 -199
  13. python-musicpd-0.9.0/python_musicpd.egg-info/PKG-INFO +0 -199
  14. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/LICENSE.txt +0 -0
  15. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/MANIFEST.in +0 -0
  16. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/README.rst +0 -0
  17. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/commands.txt +0 -0
  18. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/conf.py +0 -0
  19. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/contribute.rst +0 -0
  20. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/doc.rst +0 -0
  21. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/examples/client.py +0 -0
  22. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/examples/connect.py +0 -0
  23. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/examples/connect_host.py +0 -0
  24. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/examples/exceptions.py +0 -0
  25. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/examples/findadd.py +0 -0
  26. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/examples/playback.py +0 -0
  27. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/examples.rst +0 -0
  28. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/doc/source/index.rst +1 -1
  29. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/python_musicpd.egg-info/dependency_links.txt +0 -0
  30. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/python_musicpd.egg-info/requires.txt +0 -0
  31. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/python_musicpd.egg-info/top_level.txt +0 -0
  32. {python-musicpd-0.9.0 → python_musicpd-0.9.2}/setup.cfg +0 -0
@@ -1,6 +1,23 @@
1
1
  python-musicpd Changes List
2
2
  ===========================
3
3
 
4
+ Changes in 0.9.2
5
+ ----------------
6
+
7
+ * Add missing build-backend in pyproject.toml
8
+ * Add protocol commands
9
+ * Add stickernamestypes and stickertypes commands
10
+ * Add searchplaylist command
11
+ * Fixed deprecation in pyproject.toml
12
+
13
+ Changes in 0.9.1
14
+ ----------------
15
+
16
+ * Add playlistlength command
17
+ * Add stickernames command
18
+ * Add searchcount command
19
+ * Improved documentation, add supported commands rtype
20
+
4
21
  Changes in 0.9.0
5
22
  ----------------
6
23
 
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-musicpd
3
+ Version: 0.9.2
4
+ Summary: An MPD (Music Player Daemon) client library written in pure Python.
5
+ Author-email: Kaliko Jack <kaliko@azylum.org>
6
+ License-Expression: LGPL-3.0-or-later
7
+ Project-URL: Homepage, https://kaliko.me/python-musicpd/
8
+ Keywords: mpd,Music Player Daemon
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Natural Language :: English
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/x-rst
17
+ License-File: LICENSE.txt
18
+ Provides-Extra: sphinx
19
+ Requires-Dist: Sphinx>=5.3.0; extra == "sphinx"
20
+ Dynamic: license-file
21
+
22
+ Music Player Daemon client module
23
+ *********************************
24
+
25
+ An MPD (Music Player Daemon) client library written in pure Python.
26
+
27
+ ----
28
+
29
+ :Documentation: https://kaliko.gitlab.io/python-musicpd
30
+ :MPD Protocol: https://www.musicpd.org/doc/html/protocol.html
31
+ :Code: https://gitlab.com/kaliko/python-musicpd
32
+ :Dependencies: None
33
+ :Compatibility: Python 3.6+
34
+ :Licence: GNU LGPLv3
@@ -0,0 +1,204 @@
1
+ Below the commands list last updated for v0.9.2.
2
+
3
+ Querying MPD’s status
4
+ ^^^^^^^^^^^^^^^^^^^^^
5
+
6
+ Protocol documentation: `Querying MPD’s status <https://mpd.readthedocs.io/en/latest/protocol.html#querying-mpd-s-status>`_
7
+
8
+ * **clearerror** -> None
9
+ * **currentsong** -> dict
10
+ * **idle** -> list
11
+ * **status** -> dict
12
+ * **stats** -> dict
13
+
14
+ Playback Option
15
+ ^^^^^^^^^^^^^^^
16
+
17
+ Protocol documentation: `Playback Option <https://mpd.readthedocs.io/en/latest/protocol.html#playback-options>`_
18
+
19
+ * **consume** -> None
20
+ * **crossfade** -> None
21
+ * **mixrampdb** -> None
22
+ * **mixrampdelay** -> None
23
+ * **random** -> None
24
+ * **repeat** -> None
25
+ * **setvol** -> None
26
+ * **getvol** -> dict
27
+ * **single** -> None
28
+ * **replay_gain_mode** -> None
29
+ * **replay_gain_status** -> str
30
+ * **volume** -> None
31
+
32
+ Controlling playback
33
+ ^^^^^^^^^^^^^^^^^^^^
34
+
35
+ Protocol documentation: `Controlling playback <https://mpd.readthedocs.io/en/latest/protocol.html#controlling-playback>`_
36
+
37
+ * **next** -> None
38
+ * **pause** -> None
39
+ * **play** -> None
40
+ * **playid** -> None
41
+ * **previous** -> None
42
+ * **seek** -> None
43
+ * **seekid** -> None
44
+ * **seekcur** -> None
45
+ * **stop** -> None
46
+
47
+ The Queue
48
+ ^^^^^^^^^
49
+
50
+ Protocol documentation: `The Queue <https://mpd.readthedocs.io/en/latest/protocol.html#the-queue>`_
51
+
52
+ * **add** -> None
53
+ * **addid** -> str
54
+ * **clear** -> None
55
+ * **delete** -> None
56
+ * **deleteid** -> None
57
+ * **move** -> None
58
+ * **moveid** -> None
59
+ * **playlist** -> list
60
+ * **playlistfind** -> list[dict]
61
+ * **playlistid** -> list[dict]
62
+ * **playlistinfo** -> list[dict]
63
+ * **playlistsearch** -> list[dict]
64
+ * **plchanges** -> list[dict]
65
+ * **plchangesposid** -> list[dict]
66
+ * **prio** -> None
67
+ * **prioid** -> None
68
+ * **rangeid** -> None
69
+ * **shuffle** -> None
70
+ * **swap** -> None
71
+ * **swapid** -> None
72
+ * **addtagid** -> None
73
+ * **cleartagid** -> None
74
+
75
+ Stored playlists
76
+ ^^^^^^^^^^^^^^^^
77
+
78
+ Protocol documentation: `Stored playlists <https://mpd.readthedocs.io/en/latest/protocol.html#stored-playlists>`_
79
+
80
+ * **listplaylist** -> list
81
+ * **listplaylistinfo** -> list[dict]
82
+ * **searchplaylist** -> list[dict]
83
+ * **listplaylists** -> dict
84
+ * **load** -> None
85
+ * **playlistadd** -> None
86
+ * **playlistclear** -> None
87
+ * **playlistdelete** -> None
88
+ * **playlistlength** -> dict
89
+ * **playlistmove** -> None
90
+ * **rename** -> None
91
+ * **rm** -> None
92
+ * **save** -> None
93
+
94
+ The music database
95
+ ^^^^^^^^^^^^^^^^^^
96
+
97
+ Protocol documentation: `The music database <https://mpd.readthedocs.io/en/latest/protocol.html#the-music-database>`_
98
+
99
+ * **albumart** -> dict
100
+ * **count** -> dict
101
+ * **getfingerprint** -> dict
102
+ * **find** -> list[dict]
103
+ * **findadd** -> None
104
+ * **list** -> list
105
+ * **listall** -> list[dict]
106
+ * **listallinfo** -> list[dict]
107
+ * **listfiles** -> list[dict]
108
+ * **lsinfo** -> list[dict]
109
+ * **readcomments** -> dict
110
+ * **readpicture** -> dict
111
+ * **search** -> list[dict]
112
+ * **searchadd** -> None
113
+ * **searchaddpl** -> None
114
+ * **searchcount** -> dict
115
+ * **update** -> str
116
+ * **rescan** -> str
117
+
118
+ Mounts and neighbors
119
+ ^^^^^^^^^^^^^^^^^^^^
120
+
121
+ Protocol documentation: `Mounts and neighbors <https://mpd.readthedocs.io/en/latest/protocol.html#mounts-and-neighbors>`_
122
+
123
+ * **mount** -> None
124
+ * **unmount** -> None
125
+ * **listmounts** -> list[dict]
126
+ * **listneighbors** -> list[dict]
127
+
128
+ Stickers
129
+ ^^^^^^^^
130
+
131
+ Protocol documentation: `Stickers <https://mpd.readthedocs.io/en/latest/protocol.html#stickers>`_
132
+
133
+ * **sticker get** -> str
134
+ * **sticker set** -> None
135
+ * **sticker delete** -> None
136
+ * **sticker list** -> list
137
+ * **sticker find** -> list[dict]
138
+ * **stickernames** -> list
139
+ * **stickertypes** -> list
140
+ * **stickernamestypes** -> list
141
+
142
+ Connection settings
143
+ ^^^^^^^^^^^^^^^^^^^
144
+
145
+ Protocol documentation: `Connection settings <https://mpd.readthedocs.io/en/latest/protocol.html#connection-settings>`_
146
+
147
+ * **password** -> None
148
+ * **ping** -> None
149
+ * **binarylimit** -> None
150
+ * **tagtypes** -> list
151
+ * **tagtypes disable** -> None
152
+ * **tagtypes enable** -> None
153
+ * **tagtypes clear** -> None
154
+ * **tagtypes all** -> None
155
+ * **protocol** -> list
156
+ * **protocol disable** -> None
157
+ * **protocol enable** -> None
158
+ * **protocol clear** -> None
159
+ * **protocol all** -> None
160
+ * **protocol available** -> list
161
+
162
+ Partition Commands
163
+ ^^^^^^^^^^^^^^^^^^
164
+
165
+ Protocol documentation: `Partition Commands <https://mpd.readthedocs.io/en/latest/protocol.html#partition-commands>`_
166
+
167
+ * **partition** -> None
168
+ * **listpartitions** -> list
169
+ * **newpartition** -> None
170
+ * **delpartition** -> None
171
+ * **moveoutput** -> None
172
+
173
+ Audio output devices
174
+ ^^^^^^^^^^^^^^^^^^^^
175
+
176
+ Protocol documentation: `Audio output devices <https://mpd.readthedocs.io/en/latest/protocol.html#audio-output-devices>`_
177
+
178
+ * **disableoutput** -> None
179
+ * **enableoutput** -> None
180
+ * **toggleoutput** -> None
181
+ * **outputs** -> list[dict]
182
+ * **outputset** -> None
183
+
184
+ Reflection
185
+ ^^^^^^^^^^
186
+
187
+ Protocol documentation: `Reflection <https://mpd.readthedocs.io/en/latest/protocol.html#reflection>`_
188
+
189
+ * **config** -> dict
190
+ * **commands** -> list
191
+ * **notcommands** -> list
192
+ * **urlhandlers** -> list
193
+ * **decoders** -> list[dict]
194
+
195
+ Client to Client
196
+ ^^^^^^^^^^^^^^^^
197
+
198
+ Protocol documentation: `Client to Client <https://mpd.readthedocs.io/en/latest/protocol.html#client-to-client>`_
199
+
200
+ * **subscribe** -> None
201
+ * **unsubscribe** -> None
202
+ * **channels** -> list
203
+ * **readmessages** -> list[dict]
204
+ * **sendmessage** -> None
@@ -1,4 +1,4 @@
1
- .. SPDX-FileCopyrightText: 2018-2023 kaliko <kaliko@azylum.org>
1
+ .. SPDX-FileCopyrightText: 2018-2024 kaliko <kaliko@azylum.org>
2
2
  .. SPDX-License-Identifier: LGPL-3.0-or-later
3
3
 
4
4
  .. _commands:
@@ -13,6 +13,4 @@ Get current available commands:
13
13
  import musicpd
14
14
  print(' '.join([cmd for cmd in musicpd.MPDClient()._commands.keys()]))
15
15
 
16
- List, last updated for v0.8.0:
17
-
18
- .. literalinclude:: commands.txt
16
+ .. include:: _commands.rst
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # SPDX-FileCopyrightText: 2012-2024 kaliko <kaliko@azylum.org>
2
+ # SPDX-FileCopyrightText: 2012-2025 kaliko <kaliko@azylum.org>
3
3
  # SPDX-FileCopyrightText: 2021 Wonko der Verständige <wonko@hanstool.org>
4
4
  # SPDX-FileCopyrightText: 2019 Naglis Jonaitis <naglis@mailbox.org>
5
5
  # SPDX-FileCopyrightText: 2019 Bart Van Loon <bbb@bbbart.be>
@@ -19,7 +19,7 @@ ERROR_PREFIX = "ACK "
19
19
  SUCCESS = "OK"
20
20
  NEXT = "list_OK"
21
21
  #: Module version
22
- VERSION = '0.9.0'
22
+ VERSION = '0.9.2'
23
23
  #: Seconds before a connection attempt times out
24
24
  #: (overriden by :envvar:`MPD_TIMEOUT` env. var.)
25
25
  CONNECTION_TIMEOUT = 30
@@ -185,14 +185,14 @@ class MPDClient:
185
185
  .. note:: This is the version of the protocol spoken, not the real version of the daemon."""
186
186
  self._reset()
187
187
  self._commands = {
188
- # Status Commands
188
+ # Querying MPD’s status # querying-mpd-s-status
189
189
  "clearerror": self._fetch_nothing,
190
190
  "currentsong": self._fetch_object,
191
191
  "idle": self._fetch_list,
192
192
  #"noidle": None,
193
193
  "status": self._fetch_object,
194
194
  "stats": self._fetch_object,
195
- # Playback Option Commands
195
+ # Playback Option # playback-options
196
196
  "consume": self._fetch_nothing,
197
197
  "crossfade": self._fetch_nothing,
198
198
  "mixrampdb": self._fetch_nothing,
@@ -205,7 +205,7 @@ class MPDClient:
205
205
  "replay_gain_mode": self._fetch_nothing,
206
206
  "replay_gain_status": self._fetch_item,
207
207
  "volume": self._fetch_nothing,
208
- # Playback Control Commands
208
+ # Controlling playback # controlling-playback
209
209
  "next": self._fetch_nothing,
210
210
  "pause": self._fetch_nothing,
211
211
  "play": self._fetch_nothing,
@@ -215,7 +215,7 @@ class MPDClient:
215
215
  "seekid": self._fetch_nothing,
216
216
  "seekcur": self._fetch_nothing,
217
217
  "stop": self._fetch_nothing,
218
- # Queue Commands
218
+ # The Queue # the-queue
219
219
  "add": self._fetch_nothing,
220
220
  "addid": self._fetch_item,
221
221
  "clear": self._fetch_nothing,
@@ -238,19 +238,21 @@ class MPDClient:
238
238
  "swapid": self._fetch_nothing,
239
239
  "addtagid": self._fetch_nothing,
240
240
  "cleartagid": self._fetch_nothing,
241
- # Stored Playlist Commands
241
+ # Stored playlists # stored-playlists
242
242
  "listplaylist": self._fetch_list,
243
243
  "listplaylistinfo": self._fetch_songs,
244
+ "searchplaylist": self._fetch_songs,
244
245
  "listplaylists": self._fetch_playlists,
245
246
  "load": self._fetch_nothing,
246
247
  "playlistadd": self._fetch_nothing,
247
248
  "playlistclear": self._fetch_nothing,
248
249
  "playlistdelete": self._fetch_nothing,
250
+ "playlistlength": self._fetch_object,
249
251
  "playlistmove": self._fetch_nothing,
250
252
  "rename": self._fetch_nothing,
251
253
  "rm": self._fetch_nothing,
252
254
  "save": self._fetch_nothing,
253
- # Database Commands
255
+ # The music database # the-music-database
254
256
  "albumart": self._fetch_composite,
255
257
  "count": self._fetch_object,
256
258
  "getfingerprint": self._fetch_object,
@@ -266,20 +268,24 @@ class MPDClient:
266
268
  "search": self._fetch_songs,
267
269
  "searchadd": self._fetch_nothing,
268
270
  "searchaddpl": self._fetch_nothing,
271
+ "searchcount": self._fetch_object,
269
272
  "update": self._fetch_item,
270
273
  "rescan": self._fetch_item,
271
- # Mounts and neighbors
274
+ # Mounts and neighbors # mounts-and-neighbors
272
275
  "mount": self._fetch_nothing,
273
276
  "unmount": self._fetch_nothing,
274
277
  "listmounts": self._fetch_mounts,
275
278
  "listneighbors": self._fetch_neighbors,
276
- # Sticker Commands
279
+ # Stickers # stickers
277
280
  "sticker get": self._fetch_item,
278
281
  "sticker set": self._fetch_nothing,
279
282
  "sticker delete": self._fetch_nothing,
280
283
  "sticker list": self._fetch_list,
281
284
  "sticker find": self._fetch_songs,
282
- # Connection Commands
285
+ "stickernames": self._fetch_list,
286
+ "stickertypes": self._fetch_list,
287
+ "stickernamestypes": self._fetch_list,
288
+ # Connection settings # connection-settings
283
289
  "close": None,
284
290
  "kill": None,
285
291
  "password": self._fetch_nothing,
@@ -290,25 +296,31 @@ class MPDClient:
290
296
  "tagtypes enable": self._fetch_nothing,
291
297
  "tagtypes clear": self._fetch_nothing,
292
298
  "tagtypes all": self._fetch_nothing,
293
- # Partition Commands
299
+ "protocol": self._fetch_list,
300
+ "protocol disable": self._fetch_nothing,
301
+ "protocol enable": self._fetch_nothing,
302
+ "protocol clear": self._fetch_nothing,
303
+ "protocol all": self._fetch_nothing,
304
+ "protocol available": self._fetch_list,
305
+ # Partition Commands # partition-commands
294
306
  "partition": self._fetch_nothing,
295
307
  "listpartitions": self._fetch_list,
296
308
  "newpartition": self._fetch_nothing,
297
309
  "delpartition": self._fetch_nothing,
298
310
  "moveoutput": self._fetch_nothing,
299
- # Audio Output Commands
311
+ # Audio output devices # audio-output-devices
300
312
  "disableoutput": self._fetch_nothing,
301
313
  "enableoutput": self._fetch_nothing,
302
314
  "toggleoutput": self._fetch_nothing,
303
315
  "outputs": self._fetch_outputs,
304
316
  "outputset": self._fetch_nothing,
305
- # Reflection Commands
317
+ # Reflection # reflection
306
318
  "config": self._fetch_object,
307
319
  "commands": self._fetch_list,
308
320
  "notcommands": self._fetch_list,
309
321
  "urlhandlers": self._fetch_list,
310
322
  "decoders": self._fetch_plugins,
311
- # Client to Client
323
+ # Client to Client # client-to-client
312
324
  "subscribe": self._fetch_nothing,
313
325
  "unsubscribe": self._fetch_nothing,
314
326
  "channels": self._fetch_list,