Skip to content

Commit

Permalink
Update param_functions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsil authored Nov 17, 2024
1 parent 5ba0433 commit 7b9b7ba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions esmerald/param_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ def Security(
return params.Security(dependency=dependency, scopes=scopes, use_cache=use_cache)


def DirectInjects(
dependency: Optional[Callable[..., Any]] = None,
*,
use_cache: bool = True,
) -> Any:
"""
This function should be only called if Inject/Injects is not used in the dependencies.
This is a simple wrapper of the classic Depends().
"""
return params.Depends(dependency=dependency, use_cache=use_cache)

def Form(
default: Any = _PyUndefined,
*,
Expand Down

0 comments on commit 7b9b7ba

Please sign in to comment.