srecli.cli module

cli.py

This module contains basic wrapper to initliaize CLI object.

class srecli.cli.Context

Bases: object

A class for setting context variables for CLI.

class srecli.cli.SreCLI(name: str | 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[[...], Any] | None = None, **attrs: Any)

Bases: MultiCommand

A class to initialize CLI tool with all its subcommands and help messages.

get_command(ctx, name)

Gets a specific command given.

list_commands(ctx)

Returns list of commands.

list_commands_executed = False
srecli.cli.add_options(options)