import_object
faststream.cli.utils.imports.import_object #
Import an object from a module.
PARAMETER | DESCRIPTION |
---|---|
module | The path to the module file. TYPE: |
app | The name of the object to import. TYPE: |
RETURNS | DESCRIPTION |
---|---|
object | The imported object. |
RAISES | DESCRIPTION |
---|---|
FileNotFoundError | If the module file is not found. |
ValueError | If the module has no loader. |
AttributeError | If the object is not found in the module. |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/cli/utils/imports.py
Last update: 2023-11-13