Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. myawesomecli env info
  2. myawesomecli env clean
  3. myawesomecli env ...
  4.  
  5. myawesomecli database create-table <name>
  6. myawesomecli database insert <entry>
  7. myawesomecli database ...
  8.  
  9. import click
  10. @click.version_option(version='0.1 ')
  11. def cli():
  12. pass
  13.  
  14. @cli.command()
  15. @click.argument('option')
  16. def env(option):
  17. if option == 'info':
  18. click.echo("run env info command")
  19. elif option == 'clean':
  20. click.echo("run env clean command")
  21. ...
  22.  
  23. @cli.command()
  24. @click.argument('option')
  25. def database(option):
  26. if option == 'create-table':
  27. click.echo("run database create-table command")
  28. elif option == 'clean':
  29. click.echo("run database clean command")
  30. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement