Skip to content

get_fastapi_dependant

faststream.broker.fastapi.get_dependant.get_fastapi_dependant #

get_fastapi_dependant(orig_call, dependencies)

Generate FastStream-Compatible FastAPI Dependant object.

Source code in faststream/broker/fastapi/get_dependant.py
def get_fastapi_dependant(
    orig_call: Callable[..., Any],
    dependencies: Iterable["params.Depends"],
) -> Any:
    """Generate FastStream-Compatible FastAPI Dependant object."""
    dependent = get_fastapi_native_dependant(
        orig_call=orig_call,
        dependencies=dependencies,
    )

    dependent = _patch_fastapi_dependent(dependent)

    return dependent