forked from scottstanfield/ranked-choice-voting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocopt_example.py
executable file
·29 lines (23 loc) · 1.05 KB
/
docopt_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python
"""Example of DocOpt
Usage:
docopt_example.py (-h | --help)
docopt_example.py --version
docopt_example.py aws [--az=<az>] [--sg=<sg>] [--ssh_user=<sshuser>] [--ssh_key=<sshkey>] [--instance_type=<instance_type>] [--ami_id=<ami_id>] [--roles=<roles> ...]
docopt_example.py azure [--roles=<roles> ...]
docopt_example.py digitalocean [--roles=<roles> ...]
Options:
-h --help Show this screen.
--az=availability zone AWS availability zone [default: US-EAST-1A]
--sg=securitygroup AWS security group [default: mvco-0]
--ssh_user=ssh_user SSH user account name [default: ubuntu]
--ssh_key=ssh_key SSH private key name [default: mvco-0]
--inst_type=intst_type AWS instance type [default: m1.small]
--ami_id=ami_id AWS ami id [default: ami-a73264ce]
--roles=csv of roles Roles to apply to new node [default: a,b,c]
--version Show version.
"""
from docopt import docopt
if __name__ == '__main__':
arguments = docopt(__doc__, version='Naval Fate 2.0')
print(arguments)