bucky.cli.typer_utils
#
Provide utils to typer to enable click-like invoke.
Module Contents#
Functions#
|
Return the click.Command object for a given callable, if it is registered under the given Typer instance. |
|
Return a CommandInfo that is contained within a Typer instance. |
|
Return a TyperInfo that is contained within a Typer instance. |
|
Forward a callable that is a registered command or subcommand of the typer_instance. |
|
Invoke a callable that is a registered command or subcommand of the typer_instance. |
Attributes#
- bucky.cli.typer_utils.callback_to_click_command(typer_instance: typer.Typer, callback: Union[Callable[Ellipsis, T], click.Command]) Union[Callable[Ellipsis, T], click.Command] [source]#
Return the click.Command object for a given callable, if it is registered under the given Typer instance.
If the callback is not a registered command, just returns the callback.
- bucky.cli.typer_utils.find_command_info(typer_instance: typer.Typer, callback: Callable) Optional[typer.models.CommandInfo] [source]#
Return a CommandInfo that is contained within a Typer instance.
- bucky.cli.typer_utils.find_typer_info(typer_instance: typer.Typer, callback: Callable) Optional[typer.models.TyperInfo] [source]#
Return a TyperInfo that is contained within a Typer instance.