Skip to content

Instantly share code, notes, and snippets.

@mmanylov-zz
Created February 17, 2021 22:02
Show Gist options
  • Save mmanylov-zz/9d3779b4440b8b871db24b62634b2962 to your computer and use it in GitHub Desktop.
Save mmanylov-zz/9d3779b4440b8b871db24b62634b2962 to your computer and use it in GitHub Desktop.
import click
@click.group()
def greet():
pass
@greet.command()
@click.argument('name') # add the name argument
def hello(**kwargs):
print('Hello, {0}!'.format(kwargs['name']))
@greet.command()
@click.argument('name')
def goodbye(**kwargs):
print('Goodbye, {0}!'.format(kwargs['name']))
if __name__ == '__main__':
greet()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment