feat: blackbox call

This commit is contained in:
Dan Chen
2024-03-21 15:59:35 +08:00
parent 726b926d98
commit 11e1659e22
12 changed files with 49 additions and 13 deletions

View File

@ -8,7 +8,7 @@ class Blackbox(ABC):
the methods processing, valid and fast_api_handler.
If implemented correctly, the blackbox class can be used in the main.py file
"""
def __init__(self, *args, **kwargs) -> None:
def __init__(self, *args, **kwargs):
pass
"""
@ -18,7 +18,7 @@ class Blackbox(ABC):
Output same as above.
"""
@abstractmethod
async def processing(self, *args, **kwargs) -> any:
async def processing(self, *args, **kwargs):
pass
"""
@ -34,5 +34,9 @@ class Blackbox(ABC):
to the method.
"""
@abstractmethod
def fast_api_handler(self, request: Request) -> Response:
async def fast_api_handler(self, request: Request) -> Response:
pass
@abstractmethod
def __call__(self, *args, **kwargs):
pass