<s> __author__ = '<STR_LIT>' <EOL> import code <EOL> from optparse import OptionParser , OptionGroup <EOL> usage = "<STR_LIT>" <EOL> parser = OptionParser ( usage ) <EOL> group_ops = OptionGroup ( parser , "<STR_LIT>" , <EOL> "<STR_LIT>" ) <EOL> group_ops . add_option ( "<STR_LIT>" , "<STR_LIT>" , <EOL> help = "<STR_LIT>" , <EOL> action = "<STR_LIT:store_true>" , dest = "<STR_LIT>" ) <EOL> group_ops . add_option ( "<STR_LIT>" , "<STR_LIT>" , <EOL> help = "<STR_LIT>" , <EOL> action = "<STR_LIT:store_true>" , dest = "<STR_LIT>" ) <EOL> group_ops . add_option ( "<STR_LIT>" , "<STR_LIT>" , <EOL> help = "<STR_LIT>" , <EOL> action = "<STR_LIT:store_true>" , dest = "<STR_LIT>" ) <EOL> parser . add_option_group ( group_ops ) <EOL> ( options , args ) = parser . parse_args ( ) <EOL> if options . run is True : <EOL> from restapi import app , db <EOL> print ( "<STR_LIT>" ) <EOL> app . run ( debug = True , host = "<STR_LIT>" ) <EOL> elif options . init is True : <EOL> from restapi import app , db <EOL> print ( "<STR_LIT>" ) <EOL> db . create_all ( ) <EOL> elif options . shell : <EOL> from restapi import app , db <EOL> with app . app_context ( ) : <EOL> code . interact ( local = { <EOL> "<STR_LIT>" : app , <EOL> "<STR_LIT>" : db <EOL> } ) <EOL> else : <EOL> parser . print_help ( ) </s>
