]> kaliko git repositories - python-musicpdaio.git/blob - doc/source/reference.rst
Add more docstrings
[python-musicpdaio.git] / doc / source / reference.rst
1 .. _reference:
2
3 Reference
4 =========
5
6 .. _environment_variables:
7
8 Environment variables
9 ---------------------
10
11 :py:class:`mpdaio.MPDClient<mpdaio.client.MPDClient>` honors the following environment variables:
12
13 .. envvar:: MPD_HOST
14
15    MPD host (:abbr:`FQDN (fully qualified domain name)`, IP, socket path or abstract socket) and password.
16
17     | To define a **password** set :envvar:`MPD_HOST` to "*password@host*" (password only "*password@*")
18     | For **abstract socket** use "@" as prefix : "*@socket*" and then with a password  "*pass@@socket*"
19     | Regular **unix socket** are set with an absolute path: "*/run/mpd/socket*"
20
21 .. envvar:: MPD_PORT
22
23    MPD port, relevant for TCP socket only
24
25 .. envvar:: MPD_TIMEOUT
26
27    socket timeout when connecting to MPD and waiting for MPD’s response (in seconds)
28
29 .. envvar:: XDG_RUNTIME_DIR
30
31    path to look for potential socket
32
33 .. _default_settings:
34
35 Default settings
36 ----------------
37
38 Default host:
39  * use :envvar:`MPD_HOST` environment variable if set, extract password if present,
40  * else looks for an existing file in :envvar:`${XDG_RUNTIME_DIR:-/run/}/mpd/socket`
41  * else set host to ``localhost``
42
43 Default port:
44  * use :envvar:`MPD_PORT` environment variable if set
45  * else use ``6600``
46
47 Default timeout:
48  * use :envvar:`MPD_TIMEOUT` if set
49  * else use :py:obj:`mpdaio.const.CONNECTION_TIMEOUT`
50
51 Supported commands
52 ------------------
53
54 .. include:: commands.rst
55
56 Module documentation
57 --------------------
58
59 MPDClient class
60 ^^^^^^^^^^^^^^^
61
62 .. automodule:: mpdaio.client
63    :members:
64
65 Constants
66 ^^^^^^^^^
67
68 .. automodule:: mpdaio.const
69    :members:
70
71 .. vim: spell spelllang=en