Karana.KUtils.Kclick#
Classes and functions used to create a Kclick CLI application.
This module contains classes and functions used to create Kclick CLI applications. Kclick is a thin wrapper around the third-party, open-source click package, which is used to quickly generate high-quality CLI applications.
Attributes#
Classes#
Thin wrapper around click.Group that simplifies command functions. |
Functions#
Module Contents#
- Karana.KUtils.Kclick.kclick_options#
- Karana.KUtils.Kclick.output_type = ''#
- Karana.KUtils.Kclick.cfg_file = ''#
- class Karana.KUtils.Kclick.KGroup(name: str | None = None, commands: collections.abc.MutableMapping[str, Command] | collections.abc.Sequence[Command] | None = None, invoke_without_command: bool = False, no_args_is_help: bool | None = None, subcommand_metavar: str | None = None, chain: bool = False, result_callback: Callable[Ellipsis, Any] | None = None, **kwargs: Any)[source]#
Bases:
click.GroupThin wrapper around click.Group that simplifies command functions.
Command functions need only return the incoming kwargs. The logic used here will automatically update the kclick_options with said kwargs.
- Karana.KUtils.Kclick.cli(ctx, **kwargs)[source]#
Major click group.
This is the main click group used for all Kclick CLI applications. Commands and options can be added to this group, and they will show up in your Kclick CLI application.
- Karana.KUtils.Kclick.test(ctx, **kwargs)[source]#
Kclick cli group callback.
This callback merges all options from all commands.