INNER CODE UNIT · Python
get_headers
SearchSavior/OpenArc · src/cli/main.py:52
def get_headers(self):
"""Get headers for API requests."""
headers = {'Content-Type': 'application/json'}
if self.api_key:
headers['Authorization'] = f'Bearer {self.api_key}'
return headers
class ColoredAsciiArtGroup(click.RichGroup):
"""Custom Click group with cached ASCII art banner for performance."""
# Cache ASCII art as class attribute (built once, reused forever)
_ascii_art_cache = None
@classmethod
def _build_ascii_art(cls) -> Text:
"""Build and cache the ASCII art banner."""
if cls._ascii_art_cache is None: