primus.cli.report.utils module

Utility functions for report CLI commands.

primus.cli.report.utils.build_report_info_table(report_instance: Report, config_name: str, task_status: str) → Table

Creates a Rich Table containing the standard report identification information.

primus.cli.report.utils.format_kv(key: str, value: str, max_key_len: int) → Text

Formats a key-value pair with consistent padding.

primus.cli.report.utils.resolve_account_id_for_command(client: PrimusDashboardClient, account_identifier: str | None) → str

Resolves the account ID based on provided identifier or default context.

primus.cli.report.utils.resolve_report(identifier: str, account_id: str, client: PrimusDashboardClient) → Report | None

Helper to find a Report by ID or name within an account. Tries ID first if it looks like a UUID, otherwise tries name first. (Note: This function needs to be implemented based on available model methods,

e.g., Report.get_by_id and potentially Report.list_by_account_and_name)

primus.cli.report.utils.resolve_report_config(identifier: str, account_id: str, client: PrimusDashboardClient) → ReportConfiguration | None

Helper to find a ReportConfiguration by ID or name within an account. Tries ID first if it looks like a UUID, otherwise tries name first.