Module Expr Str ImportFrom alias alias Import alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args defaults body Expr Str ImportFrom alias alias alias alias alias alias alias alias alias alias alias alias decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str If UnaryOpNot Call AttributeLoad NameLoad attr body Raise Call NameLoad Str Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIn NameLoad TupleLoad Str Str body Return Call NameLoad Call NameLoad NameLoad Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIn Str NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad NameLoad If Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad If CompareGtE NameLoad NameLoad body Raise Call NameLoad Str orelse Assign NameStore NameLoad orelse Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Num Return Call NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str FunctionDef arguments args NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str NameLoad Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad BoolOpOr NameLoad ListLoad BoolOpOr NameLoad ListLoad If BoolOpAnd UnaryOpNot NameLoad UnaryOpNot NameLoad body Raise Call NameLoad Str If BoolOpAnd CompareGt Call NameLoad NameLoad Num NameLoad body Raise Call NameLoad Str If UnaryOpNot Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad Str If NameLoad body Raise Call NameLoad Str FunctionDef arguments args defaults vararg kwarg body If NameLoad body Return Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad If BoolOpAnd CompareIn NameLoad NameLoad CompareNotEq NameLoad NameLoad body TryExcept body Assign SubscriptStore NameLoad Index NameLoad Call SubscriptLoad NameLoad Index NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr Str Return Call NameLoad NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot NameLoad body Raise Call AttributeLoad NameLoad attr If CompareNotIn SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Num Return Call SubscriptLoad AttributeLoad NameLoad attr Index SubscriptLoad NameLoad Index Num NameLoad SubscriptLoad NameLoad Slice Num decorator_list decorator_list Assign NameStore Call NameLoad
N/A N/A 
This is Mopidy's MPD protocol implementation.

This is partly based upon the `MPD protocol documentation
<http://www.musicpd.org/doc/protocol/>`_, which is a useful resource, but it is
rather incomplete with regards to data formats, both for requests and
responses. Thus, we have had to talk a great deal with the the original `MPD
server <http://mpd.wikia.com/>`_ using telnet to get the details we need to
implement our own MPD server which is compatible with the numerous existing
`MPD clients <http://mpd.wikia.com/wiki/Clients>`_.
 __future__ absolute_import unicode_literals N/A inspect mopidy.mpd exceptions N/A ENCODING UTF-8 N/A LINE_TERMINATOR N/A VERSION 0.19.0 load_protocol_modules N/A N/A N/A N/A N/A 
    The protocol modules must be imported to get them registered in
    :attr:`commands`.
     N/A audio_output channels command_list connection current_playlist mount music_db playback reflection status stickers stored_playlists N/A INT N/A N/A value N/A N/A N/A Converts a value that matches [+-]?\d+ into and integer. N/A N/A value None N/A N/A N/A ValueError None is not a valid integer N/A N/A int value N/A UINT N/A N/A value N/A N/A N/A Converts a value that matches \d+ into an integer. N/A N/A value None N/A N/A N/A ValueError None is not a valid integer N/A N/A N/A N/A value isdigit N/A N/A N/A ValueError Only positive numbers are allowed N/A N/A int value N/A BOOL N/A N/A value N/A N/A N/A Convert the values 0 and 1 into booleans. N/A N/A value N/A 1 0 N/A N/A N/A bool N/A int value N/A N/A ValueError N/A %r is not 0 or 1 value N/A RANGE N/A N/A value N/A N/A N/A Convert a single integer or range spec into a slice

    ``n`` should become ``slice(n, n+1)``
    ``n:`` should become ``slice(n, None)``
    ``n:m`` should become ``slice(n, m)`` and ``m > n`` must hold
     N/A N/A : value N/A N/A N/A start stop N/A N/A value split : 1 N/A start N/A UINT start N/A N/A N/A stop strip N/A N/A stop N/A UINT stop N/A N/A start stop N/A N/A N/A ValueError End must be larger than start N/A N/A stop None N/A N/A start N/A UINT value N/A stop N/A start 1 N/A N/A slice start stop N/A Commands N/A object N/A N/A Collection of MPD commands to expose to users.

    Normally used through the global instance which command handlers have been
    installed into.
     __init__ N/A N/A self N/A N/A N/A N/A self handlers N/A N/A add N/A N/A self name auth_required list_command N/A True True validators N/A N/A Create a decorator that registers a handler and validation rules.

        Additional keyword arguments are treated as converters/validators to
        apply to tokens converting them to proper Python types.

        Requirements for valid handlers:

        - must accept a context argument as the first arg.
        - may not use variable keyword arguments, ``**kwargs``.
        - may use variable arguments ``*args`` *or* a mix of required and
          optional arguments.

        Decorator returns the unwrapped function so that tests etc can use the
        functions with values with correct python types instead of strings.

        :param string name: Name of the command being registered.
        :param bool auth_required: If authorization is required.
        :param bool list_command: If command should be listed in reflection.
         wrapper N/A N/A func N/A N/A N/A N/A name N/A self handlers N/A N/A N/A ValueError N/A %s already registered name N/A N/A args varargs keywords defaults N/A N/A inspect getargspec func N/A defaults N/A dict N/A zip N/A args N/A N/A N/A len N/A defaults N/A N/A defaults N/A N/A N/A N/A args N/A varargs N/A N/A N/A TypeError Handler must accept at least one argument. N/A N/A N/A N/A len args 1 varargs N/A N/A N/A TypeError *args may not be combined with regular arguments N/A N/A N/A N/A N/A set N/A N/A validators keys issubset args N/A N/A N/A TypeError Validator for non-existent arg passed N/A keywords N/A N/A N/A TypeError **kwargs are not permitted validate N/A N/A N/A args kwargs N/A N/A varargs N/A N/A N/A func args kwargs N/A N/A N/A callargs N/A N/A inspect getcallargs func args kwargs N/A N/A N/A TypeError N/A N/A N/A N/A exceptions MpdArgError N/A wrong number of arguments for "%s" name N/A N/A key value N/A N/A callargs items N/A N/A default N/A N/A defaults get key N/A object N/A N/A N/A key validators N/A value default N/A N/A N/A N/A N/A callargs N/A key N/A N/A validators N/A key value N/A N/A N/A ValueError N/A N/A N/A N/A exceptions MpdArgError incorrect arguments N/A N/A func callargs N/A N/A N/A validate auth_required auth_required N/A N/A validate list_command list_command N/A N/A N/A self handlers N/A name validate N/A func N/A N/A wrapper N/A call N/A N/A self tokens context N/A None N/A N/A Find and run the handler registered for the given command.

        If the handler was registered with any converters/validators they will
        be run before calling the real handler.

        :param list tokens: List of tokens to process
        :param context: MPD context.
        :type context: :class:`~mopidy.mpd.dispatcher.MpdContext`
         N/A N/A tokens N/A N/A N/A N/A exceptions MpdNoCommand N/A N/A N/A tokens N/A 0 N/A self handlers N/A N/A N/A N/A exceptions MpdUnknownCommand command N/A tokens N/A 0 N/A N/A N/A N/A self handlers N/A N/A tokens N/A 0 context N/A tokens N/A 1 N/A N/A N/A commands N/A Commands