data-extract / banner.py
validops-east-1's picture
feat: optimize code + add json key extractor
c5638b0
Raw
History Blame Contribute Delete
830 Bytes
import os
import pyfiglet
from rich.console import Console
from rich.rule import Rule
from rich.text import Text
_console = Console()
SERVICE_NAME = os.getenv("SERVICE_NAME", "reconciliation-file-processing-service")
API_VERSION = os.getenv("API_VERSION", "2.2.0")
ENVIRONMENT = os.getenv("ENVIRONMENT", "production")
_BANNER_ART = pyfiglet.figlet_format("ValidOps", font="slant")
def print_banner() -> None:
_console.print(Text(_BANNER_ART, style="bold cyan"))
_console.print(f" [bold white]{'Service:':<14}[/bold white] [cyan]{SERVICE_NAME}[/cyan]")
_console.print(f" [bold white]{'Version:':<14}[/bold white] [cyan]v{API_VERSION}[/cyan]")
_console.print(f" [bold white]{'Environment:':<14}[/bold white] [cyan]{ENVIRONMENT}[/cyan]")
_console.print(Rule(style="dim cyan"))
_console.print()