Shared utilities and helper functions used across all modules in the template_python repository.
This module provides common functionality that is used by other modules throughout the repository, including configuration parsing and utility functions.
utils.py— console output helpers:success(),error(),warning(),info()(✅/❌/⚠️ /ℹ️ prefixed)properties.py— readsproperties.yml:get_repo_root(),get_repo_local(),get_repo_remote(),get_template_local(),get_template_remote()cli.py— Click-like CLI compatibility helpers backed byargparse(echo,secho,prompt,confirm,is_tty,Choice,command/optiondecorators) — TUI-safe, no external dependencyroute_utils.py— shared helpers for the/repo- and/template-style AI-tool command routers:find_repo_root()(walks upward forproperties.yml),build_env()README.md— this file
This module depends on:
- Standard library:
pathlib,argparse,subprocess pyyaml— for readingproperties.yml
The common module follows these principles:
- Shared utilities only - Functions used by multiple modules
- No business logic - Pure utility functions
- Minimal dependencies - Only depends on standard library and config
- Clear error messages - User-friendly output with emojis
- Type hints - Full type annotations for all functions
Other modules import from common:
from modules.common.utils import success, error, warning, info