def __init__(self, app, host='<STR_LIT:localhost>', port=<NUM_LIT>, debug=False, log_level=logging.DEBUG, formats=None, timeout=<NUM_LIT:20>, error_reporter=None, default_user_id=None, error_callback=format_error, error_decorator=None):
assert app<EOL>self.app = app<EOL>self.port = port<EOL>self.host = host<EOL>self.debug = debug<EOL>self.formats = formats<EOL>self.timeout = timeout<EOL>self.error_callback = error_callback<EOL>self.error_decorator = error_decorator<EOL>if default_user_id:<EOL><INDENT>self.default_user_id = default_user_id<EOL><DEDENT>set_level(log_level)<EOL>if error_reporter:<EOL><INDENT>set_error_reporter(error_reporter)<EOL><DEDENT>log.info("<STR_LIT>" % (host, port, debug))<EOL>
Take the flask app, and optionally the http port to listen on, and
        whether flask's debug mode is one or not, which callback to call when
        catching exceptions, and the api's log level