ClickClick Utility Functions

20.10.2 · maintenance · verified Thu Apr 09

ClickClick (v20.10.2) provides common helper functionality for Click-based Command Line Interfaces (CLIs), such as formatted output (tables, colored messages), terminal diffs, progress bars, and aliased command groups. It is currently in maintenance mode with infrequent releases; the last major release was in October 2020.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to use `clickclick.print_table` within a simple Click CLI application to output structured data to the console with proper formatting. Run this script as a Python file to see the output.

import click
from clickclick import print_table

@click.command()
def main():
    """Example CLI using clickclick's print_table."""
    click.echo("Fetching data...")
    headers = ['ID', 'Name', 'Status']
    rows = [
        {'ID': 1, 'Name': 'Task A', 'Status': 'Done'},
        {'ID': 2, 'Name': 'Task B', 'Status': 'Pending'},
        {'ID': 3, 'Name': 'Task C', 'Status': 'Error'}
    ]
    print_table(headers, rows, max_column_width=40)
    click.echo("Table printed.")

if __name__ == '__main__':
    main()

view raw JSON →