def endpoint()

in src/ext/guac.py [0:0]


def endpoint(option_value):
    """
    Parses the given string, validating it against the set of valid endpoint
    identifier strings ("client" or "server").

    :param option_value:
        The string to parse, as may be received from Sphinx as the value of a
        directive option.

    :return string:
        The provided, valid string.

    :raises ValueError:
        If the provided endpoint is invalid.
    """
    return directives.choice(option_value, ('client', 'server'))