def action_key(mod_name, func_name):
    """
    Generate a key uniquely identify the action defined by the module and function.

    :param mod_name: the module's full package name
    :param func_name: the function name
    :return: the key for identifying the action.
    """
    try:
        idx = mod_name.rindex('.')
    except ValueError:
        idx = -1

    if idx < 0:
        return mod_name + '.' + func_name
    else:
        return mod_name[idx+1:] + '.' + func_name