6 .. _environment_variables:
11 :py:class:`mpdaio.MPDClient<mpdaio.client.MPDClient>` honors the following environment variables:
15 MPD host (:abbr:`FQDN (fully qualified domain name)`, IP, socket path or abstract socket) and password.
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*"
23 MPD port, relevant for TCP socket only
25 .. envvar:: MPD_TIMEOUT
27 socket timeout when connecting to MPD and waiting for MPD’s response (in seconds)
29 .. envvar:: XDG_RUNTIME_DIR
31 path to look for potential socket
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``
44 * use :envvar:`MPD_PORT` environment variable if set
48 * use :envvar:`MPD_TIMEOUT` if set
49 * else use :py:obj:`mpdaio.const.CONNECTION_TIMEOUT`
54 .. include:: commands.rst
62 .. automodule:: mpdaio.client
68 .. automodule:: mpdaio.const
71 .. vim: spell spelllang=en