Created
February 17, 2021 22:02
-
-
Save mmanylov-zz/9d3779b4440b8b871db24b62634b2962 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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