Skip to content

App

main(name='World')

Say hello to the given name.

Parameters:

Name Type Description Default
name str

the name to be greeted

'World'
Source code in project/app.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
@command(context_settings={"help_option_names": ["-h", "--help"]}, help="Say hello to a user.")
@option(
    "-n",
    "--name",
    default="World",
    help="The name of the person to greet.",
    show_default=True,
)
@version_option()
def main(name: str = "World"):
    """
    Say hello to the given name.

    Args:
      name: the name to be greeted
    """
    secho(f"Hello {name}! 👋", fg="green", bold=True)