mergin/cli.py
def list_projects(ctx, flag):
    """List projects on the server."""
    filter_str = "(filter flag={})".format(flag) if flag is not None else "(all public)"
    click.echo("List of projects {}:".format(filter_str))
    mc = ctx.obj["client"]
    if mc is None:
        return
    resp = mc.paginated_projects_list(flag=flag)
    projects_list = resp["projects"]
    for project in projects_list:
        full_name = "{} / {}".format(project["namespace"], project["name"])
        click.echo(
            "  {:40}\t{:6.1f} MB\t{}".format(full_name, project["disk_usage"] / (1024 * 1024), project["version"])
        )
List projects on the server.
List projects on the server.
List projects on the server .
def list_projects(ctx, flag):
    filter_str = "(filter flag={})".format(flag) if flag is not None else "(all public)"
    click.echo("List of projects {}:".format(filter_str))
    mc = ctx.obj["client"]
    if mc is None:
        return
    resp = mc.paginated_projects_list(flag=flag)
    projects_list = resp["projects"]
    for project in projects_list:
        full_name = "{} / {}".format(project["namespace"], project["name"])
        click.echo(
            "  {:40}\t{:6.1f} MB\t{}".format(full_name, project["disk_usage"] / (1024 * 1024), project["version"])
        )
def list_projects ( ctx , flag ) : filter_str = "(filter flag={})" . format ( flag ) if flag is not None else "(all public)" click . echo ( "List of projects {}:" . format ( filter_str ) ) mc = ctx . obj [ "client" ] if mc is None : return resp = mc . paginated_projects_list ( flag = flag ) projects_list = resp [ "projects" ] for project in projects_list : full_name = "{} / {}" . format ( project [ "namespace" ] , project [ "name" ] ) click . echo ( "  {:40}\t{:6.1f} MB\t{}" . format ( full_name , project [ "disk_usage" ] / ( 1024 * 1024 ) , project [ "version" ] ) )
List projects on the server.
List projects on the server .
"""List projects on the server."""
ctx
flag