def expose(func=None, label=None, client=False):
    """A function decorator which exposes the target to the API.

    Arguments:
    func -- The function to be decorated

    Keyword arguments:
    label  -- The name under which to expose this function, if
              different from its real name.
    client -- If True, the function will receive a keyword argument
              "client" corresponding to the client which initiated
              the function call.

    """
    if func != None:
        if not label:
            label = func.__name__
        setattr(func, "__api_exposed__", True)
        setattr(func, "__api_label__", label)
        if client:
            setattr(func, "__api_pass_client__", True)
        return func
    else:
        def partial(func):
            return expose(func, label=label, client=client)
        return partial