callback
Run Typer scripts with completion, without having to create a package.
You probably want to install completion for the typer command:
$ typer --install-completion
def callback(
ctx: typer.Context,
path_or_module: str = None,
app: str = None,
func: str = None,
version: bool = False
) - > None
Run Typer scripts with completion, without having to create a package.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | typer.Context | The Typer context object used to manage state and command execution flow. |
| path_or_module | str = None | The file system path or Python module name containing the Typer application to be executed. |
| app | str = None | The specific Typer application object or variable name within the module to be used. |
| func | str = None | The specific function name to be converted into a Typer command. |
| version | bool = False | A flag that, when set to True, triggers the print_version callback to display the current version and exit. |
Returns
| Type | Description |
|---|---|
None | Nothing is returned; the function updates the internal context state and prepares the CLI for execution. |