@requires_auth<EOL><INDENT>def search_prefix(self, args):<DEDENT>
try:<EOL><INDENT>res = self.nip.search_prefix(args.get('<STR_LIT>'), args.get('<STR_LIT>'), args.get('<STR_LIT>') or {})<EOL>for prefix in res['<STR_LIT:result>']:<EOL><INDENT>prefix = _mangle_prefix(prefix)<EOL><DEDENT>return res<EOL><DEDENT>except (AuthError, NipapError) as exc:<EOL><INDENT>self.logger.debug(unicode(exc))<EOL>raise Fault(exc.error_code, unicode(exc))<EOL><DEDENT>
Search for prefixes.

            Valid keys in the `args`-struct:

            * `auth` [struct]
                Authentication options passed to the :class:`AuthFactory`.
            * `query` [struct]
                A struct specifying the search query.
            * `search_options` [struct]
                Options for the search query, such as limiting the number
                of results returned.

            Returns a struct containing the search result together with the
            search options used.

            Certain values are casted from numbers to strings because XML-RPC
            simply cannot handle anything bigger than an integer.