stouputils.version_pkg module#

This module provides utility functions for printing package version information in a structured format, including the main package and its dependencies.

Functions: - show_version: Print the version of the main package and its dependencies.

show_version(
main_package: str = 'stouputils',
primary_color: str = '\x1b[96m',
secondary_color: str = '\x1b[92m',
max_depth: int = 2,
) None[source]#

Print the version of the main package and its dependencies.

Used by the “stouputils –version” command.

Parameters:
  • main_package (str) – Name of the main package to show version for

  • primary_color (str) – Color to use for the primary package name

  • secondary_color (str) – Color to use for the secondary package names

  • max_depth (int) – Maximum depth for dependency tree (<= 2 for flat, >=3 for tree)

show_version_cli() None[source]#

Handle the “stouputils –version” CLI command