Skip to main content

get_parameterless_sub_dependant

Creates and returns a Dependant object for a parameter-less dependency by extracting the callable, scope, and security scopes from the provided dependency and path.

def get_parameterless_sub_dependant(
depends: params.Depends,
path: string
) - > Dependant

Creates a Dependant object for a dependency that does not have its own parameters, typically used for sub-dependencies in FastAPI's dependency injection system.

Parameters

NameTypeDescription
dependsparams.DependsThe dependency declaration containing the callable and optional security scopes to be processed.
pathstringThe URL path string associated with the endpoint where this dependency is being used.

Returns

TypeDescription
DependantA Dependant object configured with the dependency's callable, path, and any associated security scopes.