References
clite
Clite
Clite(
name: str | None = None,
*,
description: str | None = None,
helper: clite.helper.Helper | None = None
)
Clite class.
Class containing all the commands
name
name = (
pathlib.Path(sys.argv[0]).name
if clite.main.Clite(name) is None
else clite.main.Clite(name).lower()
)
description
description = clite.main.Clite(description)
commands
commands: dict[str, clite.parser.commands.Command] = {}
helper
helper = clite.helper.Helper()
command
command(
name: str | None = None,
*,
description: str | None = None
) -> Callable[[Callable[P, T]], Callable[P, None]]
Return wrapper function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str | None
|
name of the command |
None
|
|
str | None
|
description of the command. |
None
|
Returns:
| Type | Description |
|---|---|
collections.abc.Callable[[collections.abc.Callable[clite.main.P, clite.main.T]], collections.abc.Callable[clite.main.P, None]]
|
wrapped function |
root
root(
name: str | None = None,
*,
description: str | None = None
) -> Callable[[Callable[P, T]], Callable[P, None]]
Return wrapper function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str | None
|
name of the command |
None
|
|
str | None
|
description of the command. |
None
|
Returns:
| Type | Description |
|---|---|
collections.abc.Callable[[collections.abc.Callable[clite.main.P, clite.main.T]], collections.abc.Callable[clite.main.P, None]]
|
wrapped function |
CliRunner
CliRunner class for testing.
Result
Result(exit_code: int = 0)
Result class for testing.
exit_code
exit_code = clite.testing.Result(exit_code)