-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathmain.py
More file actions
22 lines (20 loc) · 634 Bytes
/
main.py
File metadata and controls
22 lines (20 loc) · 634 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import argparse
import logging
from blask import BlaskApp
application = BlaskApp().app
if __name__ == '__main__':
# Argument parsing
parser = argparse.ArgumentParser()
parser.add_argument(
"-d", "--debug", action='store_true', help="Verbose output")
parser.add_argument(
"-v", "--verbose", action='store_true', help="Verbose output")
args = parser.parse_args()
if args.debug or args.verbose:
log = logging.getLogger()
level = logging.getLevelName(logging.DEBUG)
log.setLevel(level)
debug = True
else:
debug = False
application.run(debug=debug)