Skip to content

harbor_cli.output.table.repository

Functions

repository_table(r: Sequence[Repository], **kwargs: Any) -> Table

Display one or more repositories in a table.

Source code in harbor_cli/output/table/repository.py
def repository_table(r: Sequence[Repository], **kwargs: Any) -> Table:
    """Display one or more repositories in a table."""
    table = get_table(
        "Repository",
        r,
        columns=[
            "Project",
            "Name",
            "Artifacts",
            "Created",
            "Updated",
        ],
    )
    for repo in r:
        table.add_row(
            repo.project_name,
            repo.name,
            str(repo.artifact_count),
            datetime_str(repo.creation_time),
            datetime_str(repo.update_time),
        )
    return table