def set_values(
     param1: int,
     d1: ServiceOne = Depends(ServiceOne),
     d2: MyMainClass = Depends(MyMainClass),
     d3: AnotherMainClass = Depends(AnotherMainClass),
 ) -> None:
     ...
 def my_function(dependency: Dependency = Depends(Dependency)):
     return dependency.x
Esempio n. 3
0
 def my_function(p1: int,
                 p2: int,
                 p3: int,
                 p4: int,
                 dep: Dependency = Depends(Dependency)) -> int:
     return p1 + p2 + dep.x + p3 + p4
Esempio n. 4
0
 def function(d: Dependency = Depends(Dependency)):
     ...
Esempio n. 5
0
 def my_function(
     value: int, dependency: Dependency = Depends(Dependency)) -> int:
     return value + dependency.x