get_app
faststream.broker.fastapi.route.get_app #
get_app(
dependant: Dependant,
dependency_overrides_provider: Optional[Any] = None,
) -> Callable[
[StreamMessage], Coroutine[Any, Any, SendableMessage]
]
Creates a FastAPI application.
PARAMETER | DESCRIPTION |
---|---|
dependant | The dependant object that defines the endpoint function and its dependencies. TYPE: |
dependency_overrides_provider | Optional provider for dependency overrides. |
RETURNS | DESCRIPTION |
---|---|
Callable[[StreamMessage], Coroutine[Any, Any, SendableMessage]] | The FastAPI application as a callable that takes a StreamMessage object as input and returns a SendableMessage coroutine. |
RAISES | DESCRIPTION |
---|---|
AssertionError | If the code reaches an unreachable state. |