try_import_app
faststream.cli.utils.imports.try_import_app #
try_import_app(module: Path, app: str) -> FastStream
Tries to import a FastStream app from a module.
| PARAMETER | DESCRIPTION |
|---|---|
module | Path to the module containing the app. TYPE: |
app | Name of the FastStream app. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
FastStream | The imported FastStream app object. |
| RAISES | DESCRIPTION |
|---|---|
FileNotFoundError | If the module file is not found. |
BadParameter | If the module or app name is not provided correctly. |