def list_models(args: argparse.Namespace):
    """
    Output the list of known models in the registry.

    :param args: :class:`argparse.Namespace` with "username", "password", "remote_repo" and \
                        "log_level"
    :return: None
    """
    try:
        git_index = GitIndex(remote=args.index_repo, username=args.username,
                             password=args.password, cache=args.cache, log_level=args.log_level)
    except ValueError:
        return 1
    for model_type, models in git_index.models.items():
        print(model_type)
        default = git_index.meta[model_type]["default"]
        for uuid, model in sorted(models.items(),
                                  key=lambda m: parse_datetime(m[1]["created_at"]),
                                  reverse=True):
            print("  %s %s" % ("*" if default == uuid else " ", uuid),
                  model["created_at"])
def list_models ( args : argparse . Namespace ) : try : git_index = GitIndex ( remote = args . index_repo , username = args . username , password = args . password , cache = args . cache , log_level = args . log_level ) except ValueError : return 1 for model_type , models in git_index . models . items ( ) : print ( model_type ) default = git_index . meta [ model_type ] [ "default" ] for uuid , model in sorted ( models . items ( ) , key = lambda m : parse_datetime ( m [ 1 ] [ "created_at" ] ) , reverse = True ) : print ( "  %s %s" % ( "*" if default == uuid else " " , uuid ) , model [ "created_at" ] )
Output the list of known models in the registry.

    :param args: :class:`argparse.Namespace` with "username", "password", "remote_repo" and \
                        "log_level"
    :return: None