

def init_app(self, app, server_pw, server_un='root', host='localhost', port=2424):
    '\n        params: see OrientDB docstring\n        '
    if (not app):
        raise Exception('pass in a flask app')
    self.app = app
    self.app.config.setdefault('ORIENTDB_SERVER_PASSWORD', server_pw)
    self.app.config.setdefault('ORIENTDB_SERVER_USERNAME', server_un)
    self.app.config.setdefault('ORIENTDB_HOST', host)
    self.app.config.setdefault('ORIENTDB_PORT', port)
    self.app.config.setdefault('ORIENTDB_DB', None)
    if hasattr(app, 'teardown_appcontext'):
        app.teardown_appcontext(self._teardown)
    else:
        app.teardown_request(self._teardown)
    app.before_request(self._before_request)
    if ('orientdb' not in app.extensions):
        app.extensions['orientdb'] = self

dataset/ETHPy150Open calthoff/flask-orientdb/flask_orientdb.py OrientDB.init_app/original