synth_typer
Class info¶
🛈 DocStrings¶
Module for generating Typer CLI implementations from CommandInfo objects.
create_app
¶
create_app(cmd_info: CommandInfo, handler: Handler | None = None) -> Typer
Create a Typer app from a CommandInfo object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cmd_info
|
CommandInfo
|
The CommandInfo object to convert |
required |
handler
|
Handler | None
|
Called with the invoked (sub)command's info and its parsed values. The root command is invoked before subcommands, as usual for typer. |
None
|
Returns:
| Type | Description |
|---|---|
Typer
|
A Typer application with all commands and subcommands |