def init_app(self, app):
self.init_config(app)<EOL>blueprint = rest.create_blueprint(<EOL>app.config['<STR_LIT>']<EOL>)<EOL>@app.before_first_request<EOL>def extend_default_endpoint_prefixes():<EOL><INDENT>"""<STR_LIT>"""<EOL>endpoint_prefixes = utils.build_default_endpoint_prefixes(<EOL>dict(app.config['<STR_LIT>'])<EOL>)<EOL>current_records_rest = app.extensions['<STR_LIT>']<EOL>overlap = set(endpoint_prefixes.keys()) & set(<EOL>current_records_rest.default_endpoint_prefixes<EOL>)<EOL>if overlap:<EOL><INDENT>raise RuntimeError(<EOL>'<STR_LIT>'.format(<EOL>'<STR_LIT:U+002CU+0020>'.join(overlap)<EOL>)<EOL>)<EOL><DEDENT>current_records_rest.default_endpoint_prefixes.update(<EOL>endpoint_prefixes<EOL>)<EOL><DEDENT>app.register_blueprint(blueprint)<EOL>app.extensions['<STR_LIT>'] = _DepositState(app)<EOL>if app.config['<STR_LIT>']:<EOL><INDENT>post_action.connect(index_deposit_after_publish, sender=app,<EOL>weak=False)<EOL><DEDENT>
Flask application initialization.

        Initialize the REST endpoints.  Connect all signals if
        `DEPOSIT_REGISTER_SIGNALS` is True.

        :param app: An instance of :class:`flask.Flask`.