jobflow_remote.cli.jfr_typer module#
- class jobflow_remote.cli.jfr_typer.JFRTyper(*args, **kwargs)[source]#
Bases:
TyperSubclassing typer to intercept exceptions and print nicer error messages.
- callback(*args, **kwargs) Callable[[CommandFunctionType], CommandFunctionType][source]#
Using the decorator @app.callback, you can declare the CLI parameters for the main CLI application.
Read more in the [Typer docs for Callbacks](https://typer.tiangolo.com/tutorial/commands/callback/).
## Example
app = typer.Typer() state = {“verbose”: False}
@app.callback() def main(verbose: bool = False):
- if verbose:
print(“Will write verbose output”) state[“verbose”] = True
@app.command() def delete(username: str):
# define subcommand …
- command(*args, **kwargs) Callable[[CommandFunctionType], CommandFunctionType][source]#
Using the decorator @app.command, you can define a subcommand of the previously defined Typer app.
Read more in the [Typer docs for Commands](https://typer.tiangolo.com/tutorial/commands/).
## Example
app = typer.Typer()
@app.command() def create():
print(“Creating user: Hiro Hamada”)
@app.command() def delete():
print(“Deleting user: Hiro Hamada”)