File size: 830 Bytes
50755bb
 
a952141
 
 
 
 
 
 
50755bb
697be7d
a29baaf
c5638b0
a952141
 
50755bb
c5638b0
50755bb
 
 
a952141
 
c5638b0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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()