def init_app(self, app, session):
        app.config.setdefault('APP_NAME', 'F.A.B.')
        app.config.setdefault('APP_THEME', '')
        app.config.setdefault('APP_ICON', '')
        app.config.setdefault('LANGUAGES',
                              {'en': {'flag': 'gb', 'name': 'English'}})
        app.config.setdefault('ADDON_MANAGERS',[])
        if self.security_manager_class is None:
            from flask_appbuilder.security.sqla.manager import SecurityManager
            self.security_manager_class = SecurityManager
        self._addon_managers = app.config['ADDON_MANAGERS']
        self.session = session
        self.sm = self.security_manager_class(self)
        self.bm = BabelManager(self)
        self._add_global_static()
        self._add_global_filters()
        app.before_request(self.sm.before_request)
        self._add_admin_views()
        self._add_addon_views()
        self._add_menu_permissions()
        if not self.app:
            for baseview in self.baseviews:
                # instantiate the views and add session
                self._check_and_init(baseview)
                # Register the views has blueprints
                self.register_blueprint(baseview)
                # Add missing permissions where needed
                self._add_permission(baseview)
        self._init_extension(app)
Will initialize the Flask app, supporting the app factory pattern.
dataset/ETHPy150Open dpgaspar/Flask-AppBuilder/flask_appbuilder/base.py/AppBuilder.init_app