get_app
faststream.broker.fastapi.route.get_app #
get_app(dependant: Dependant, provider_factory: Callable[[], Any]) -> 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: |
provider_factory | Provider factory 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. |