Skip to content

Instantly share code, notes, and snippets.

@benhagen
Created December 16, 2014 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benhagen/48f13aedc0d5f00c2e63 to your computer and use it in GitHub Desktop.
Save benhagen/48f13aedc0d5f00c2e63 to your computer and use it in GitHub Desktop.
Quick and dirty template for a Python CLI app.
#!/usr/bin/env python
"""template
Usage:
template.py list [--allregions|-r <region>...] [-v]
Options:
-h --help Show this screen
--version Show version
-r --region <region> Regions; one per region [default: us-east-1]
-v --verbose Be super noisy and annoying
"""
if __name__ == '__main__':
from docopt import docopt
arguments = docopt(__doc__, version='template 1.0')
# print arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment