def register(self, app, options):
url_prefix = options.get('<STR_LIT>', self.url_prefix)<EOL>for future in self.routes:<EOL><INDENT>future.handler.__blueprintname__ = self.name<EOL>uri = url_prefix + future.uri if url_prefix else future.uri<EOL>app.route(<EOL>uri=uri[<NUM_LIT:1>:] if uri.startswith('<STR_LIT>') else uri,<EOL>methods=future.methods,<EOL>host=future.host or self.host,<EOL>strict_slashes=future.strict_slashes,<EOL>stream=future.stream<EOL>)(future.handler)<EOL><DEDENT>for future in self.middlewares:<EOL><INDENT>if future.args or future.kwargs:<EOL><INDENT>app.middleware(*future.args,<EOL>**future.kwargs)(future.middleware)<EOL><DEDENT>else:<EOL><INDENT>app.middleware(future.middleware)<EOL><DEDENT><DEDENT>for future in self.exceptions:<EOL><INDENT>app.exception(*future.args, **future.kwargs)(future.handler)<EOL><DEDENT>for future in self.statics:<EOL><INDENT>uri = url_prefix + future.uri if url_prefix else future.uri<EOL>app.static(uri, future.file_or_directory,<EOL>*future.args, **future.kwargs)<EOL><DEDENT>for event, listeners in self.listeners.items():<EOL><INDENT>for listener in listeners:<EOL><INDENT>app.listener(event)(listener)<EOL><DEDENT><DEDENT>
Register the blueprint to the mach9 app.