Example #1
0
def my_handler(input_value: int, dependency: Dependency = Depends(Dependency)):
    return input_value + dependency.x
Example #2
0
def add_random_cows(
    number_of_cows_to_inseminate: int,
    domain_logic: Depends(DomainLogic)) -> None:
    domain_logic.add_random_cows(number_of_cows_to_inseminate)
Example #3
0
 def and_another_function(dependency=Depends(C)) -> None:
     ...
Example #4
0
def inseminate(
    number_of_cows_to_inseminate: int,
    domain_logic: Depends(DomainLogic)) -> None:
    domain_logic.inseminate_cow(number_of_cows_to_inseminate)
Example #5
0
 def my_function(dependency=Depends(A)) -> None:
     ...