X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=doc%2Fsource%2Ftutorial.rst;h=0aee9a4e48631c6f4182e457266cd8aca45b1344;hb=refs%2Fheads%2Fmain;hp=95e69488c895c9bbe913ff3d1ab99ca36920abbe;hpb=a1bb332d045c1c375ad2fa331476ee95d964017c;p=python-musicpdaio.git diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst index 95e6948..0aee9a4 100644 --- a/doc/source/tutorial.rst +++ b/doc/source/tutorial.rst @@ -44,10 +44,19 @@ Getting started .. index:: single: command; password +**musicpdaio** tries to come with sane defaults, then running +:py:class:`mpdaio.MPDClient` with no explicit argument will try default values +to connect to MPD. Cf. :ref:`reference` for more about +:ref:`defaults`. + **Using a specific host, port and a password.** -The password is sent when a connection is made, no need to explicitly send the -password command. +The password is sent when a connection is made, no need to explicitly use the +password command. In the following code a client is constructed with a password argument, then when the ping method is called: + +* the client fetch a connection from the pool +* then a password command is sent with the password +* finally the ping command is sent. .. sourcecode:: python @@ -91,6 +100,4 @@ Concurrency .. literalinclude:: tutorial/tutorial-01.py - -.. _MPD protocol documentation: http://www.musicpd.org/doc/protocol/ .. vim: spell spelllang=en