def get_password(request, mapping) -> None:
    """
    Resolve the given credential request in the provided mapping definition.

    The result is printed automatically.

    Args:
        request:
            The credential request specified as a dict of key-value pairs.
        mapping:
            The mapping configuration as a ConfigParser instance.
    """
    LOGGER.debug('Received request "%s"', request)
    if 'host' not in request:
        LOGGER.error('host= entry missing in request. '
                     'Cannot query without a host')
        return

    host = request['host']
    if 'path' in request:
        host = '/'.join([host, request['path']])

    def skip(line, skip):
        return line[skip:]

    LOGGER.debug('Iterating mapping to match against host "%s"', host)
    for section in mapping.sections():
        if fnmatch.fnmatch(host, section):
            LOGGER.debug('Section "%s" matches requested host "%s"',
                         section, host)
            # TODO handle exceptions
            pass_target = mapping.get(section, 'target').replace(
                "${host}", request['host'])

            password_extractor = SpecificLineExtractor(
                0, 0, option_suffix='_password')
            password_extractor.configure(mapping[section])
            # username_extractor = SpecificLineExtractor(
            #     1, 0, option_suffix='_username')
            username_extractor = _username_extractors[mapping[section].get(
                'username_extractor', fallback=_line_extractor_name)]
            username_extractor.configure(mapping[section])

            LOGGER.debug('Requesting entry "%s" from pass', pass_target)
            output = subprocess.check_output(
                ['pass', 'show', pass_target]).decode('utf-8')
            lines = output.splitlines()

            password = password_extractor.get_value(pass_target, lines)
            username = username_extractor.get_value(pass_target, lines)
            if password:
                print('password={password}'.format(  # noqa: T001
                    password=password))
            if 'username' not in request and username:
                print('username={username}'.format(  # noqa: T001
                    username=username))
            return

    LOGGER.warning('No mapping matched')
    sys.exit(1)
Resolve the given credential request in the provided mapping definition.

    The result is printed automatically.

    Args:
        request:
            The credential request specified as a dict of key-value pairs.
        mapping:
            The mapping configuration as a ConfigParser instance.