flask-webhook/flask_demo_api/usecase/get_gender.py

14 lines
418 B
Python

from flask_demo_api.protocols.models import GenderResponse, PeopleRequest
from flask_demo_api.protocols.repository import RepositoryGateway
class GetGender:
def __init__(
self,
repository: RepositoryGateway,
) -> None:
self.__repository = repository
def __call__(self, request: PeopleRequest) -> GenderResponse | None:
return self.__repository.get_gender(people=request)