Depends
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| dependency | `Callable[..., Any] | None` = None |
| use_cache | bool = True | A 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
| Name | Type | Description |
|---|---|---|
| dependency | `Callable[..., Any] | None` = None |
| use_cache | bool = True | A 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 |