From 178bd01069baa1fbd9cb6370204fc778119f7943 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Sat, 25 Feb 2023 14:04:13 +0000 Subject: [PATCH] Add a rich horizontal rule print on Service construction --- devine/core/service.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/devine/core/service.py b/devine/core/service.py index 3886c6a..9b50931 100644 --- a/devine/core/service.py +++ b/devine/core/service.py @@ -8,6 +8,8 @@ from urllib.parse import urlparse import click import requests from requests.adapters import HTTPAdapter, Retry +from rich.padding import Padding +from rich.rule import Rule from devine.core.cacher import Cacher from devine.core.config import config @@ -27,6 +29,11 @@ class Service(metaclass=ABCMeta): GEOFENCE: tuple[str, ...] = () # list of ip regions required to use the service. empty list == no specific region. def __init__(self, ctx: click.Context): + console.print(Padding( + Rule(f"[rule.text]Service: {self.__class__.__name__}"), + (1, 2) + )) + self.config = ctx.obj.config self.log = logging.getLogger(self.__class__.__name__)