Skip to main content

Depends

No overview available.

Attributes

AttributeTypeDescription
dependency`Callable[..., Any]None` = None
use_cachebool = TrueA boolean indicating whether the result of the dependency should be cached for subsequent calls within the same request. Defaults to True.
scope`Literal["function", "request"]None` = None

Constructor

Signature

def Depends(
dependency: Callable[..., Any]| None = None,
use_cache: bool = True,
scope: Literal["function", "request"]| None = None
) - > null

Parameters

NameTypeDescription
dependency`Callable[..., Any]None` = None
use_cachebool = TrueA boolean indicating whether the resolved dependency should be cached. If True, the dependency will be resolved only once and reused for subsequent calls within its scope. If False, the dependency will be resolved every time it's requested.
scope`Literal["function", "request"]None` = None