Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myawesomecli env info
- myawesomecli env clean
- myawesomecli env ...
- myawesomecli database create-table <name>
- myawesomecli database insert <entry>
- myawesomecli database ...
- import click
- @click.version_option(version='0.1 ')
- def cli():
- pass
- @cli.command()
- @click.argument('option')
- def env(option):
- if option == 'info':
- click.echo("run env info command")
- elif option == 'clean':
- click.echo("run env clean command")
- ...
- @cli.command()
- @click.argument('option')
- def database(option):
- if option == 'create-table':
- click.echo("run database create-table command")
- elif option == 'clean':
- click.echo("run database clean command")
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement