Files
aitbc/cli/aitbc_cli/utils/__init__.py
aitbc 3897bcbf24
Some checks failed
CLI Tests / test-cli (push) Failing after 4s
Deploy to Testnet / deploy-testnet (push) Successful in 1m40s
Documentation Validation / validate-docs (push) Failing after 12s
Documentation Validation / validate-policies-strict (push) Successful in 4s
Integration Tests / test-service-integration (push) Successful in 2m42s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 34s
Package Tests / Python package - aitbc-core (push) Successful in 27s
Package Tests / Python package - aitbc-crypto (push) Successful in 13s
Package Tests / Python package - aitbc-sdk (push) Successful in 16s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 8s
Package Tests / JavaScript package - aitbc-token (push) Successful in 18s
Python Tests / test-python (push) Failing after 50s
Security Scanning / security-scan (push) Failing after 43s
Multi-Node Stress Testing / stress-test (push) Successful in 12s
Cross-Node Transaction Testing / transaction-test (push) Successful in 9s
refactor: move version to separate module and improve logging
- Created aitbc/_version.py with centralized version definition
- Updated aitbc/__init__.py to import __version__ from _version module
- Updated constants.py to use __version__ for PACKAGE_VERSION
- Replaced print() calls with logger in decorators.py, events.py, queue_manager.py, and state.py
- Added logger initialization using get_logger(__name__) in config.py, decorators.py, events.py, queue_manager.py, and state.py
- Added cli/commands
2026-05-11 20:12:01 +02:00

48 lines
1.0 KiB
Python

"""
CLI utility functions for output formatting and error handling
"""
from click import echo, secho
# Import new utility modules
from .wallet import decrypt_private_key
from .blockchain import get_chain_info, get_network_status, get_blockchain_analytics
def output(message: str, **kwargs):
"""Print a regular output message"""
echo(message, **kwargs)
def error(message: str, **kwargs):
"""Print an error message in red"""
secho(message, fg="red", **kwargs)
def success(message: str, **kwargs):
"""Print a success message in green"""
secho(message, fg="green", **kwargs)
def info(message: str, **kwargs):
"""Print an info message in blue"""
secho(message, fg="blue", **kwargs)
def warning(message: str, **kwargs):
"""Print a warning message in yellow"""
secho(message, fg="yellow", **kwargs)
__all__ = [
'output',
'error',
'success',
'info',
'warning',
'decrypt_private_key',
'get_chain_info',
'get_network_status',
'get_blockchain_analytics',
]