class_docstr: Common behavior shared between :class:`~flask.Flask` and
  :class:`~flask.blueprints.Blueprint`.
  
  :param import_name: The import name of the module where this object
      is defined. Usually :attr:`__name__` should be used.
  :param static_folder: Path to a folder of static files to serve.
      If this is set, a static route will be added.
  :param static_url_path: URL prefix for the static route.
  :param template_folder: Path to a folder containing template files.
      for rendering. If this is set, a Jinja loader will be added.
  :param root_path: The path that static, template, and resource files
      are relative to. Typically not set, it is discovered based on
      the ``import_name``.
  
  .. versionadded:: 2.0
class_docstr_tok: ["Common","behavior","shared","between",":","class",":","`","~flask.Flask","`","and",":","class",":","`","~flask.blueprints.Blueprint","`",".",":","param","import_name",":","The","import","name","of","the","module","where","this","object","is","defined",".","Usually",":","attr",":","`","__name__","`","should","be","used",".",":","param","static_folder",":","Path","to","a","folder","of","static","files","to","serve",".","If","this","is","set",",","a","static","route","will","be","added",".",":","param","static_url_path",":","URL","prefix","for","the","static","route",".",":","param","template_folder",":","Path","to","a","folder","containing","template","files",".","for","rendering",".","If","this","is","set",",","a","Jinja","loader","will","be","added",".",":","param","root_path",":","The","path","that","static",",","template",",","and","resource","files","are","relative","to",".","Typically","not","set",",","it","is","discovered","based","on","the","``","import_name","``",".","..","versionadded",":",":","2.0"]
docstr: Decorate a view function to register it with the given URL
  rule and options. Calls :meth:`add_url_rule`, which has more
  details about the implementation.
  
  .. code-block:: python
  
      @app.route("/")
      def index():
          return "Hello, World!"
  
  See :ref:`url-route-registrations`.
  
  The endpoint name for the route defaults to the name of the view
  function if the ``endpoint`` parameter isn't passed.
  
  The ``methods`` parameter defaults to ``["GET"]``. ``HEAD`` and
  ``OPTIONS`` are added automatically.
  
  :param rule: The URL rule string.
  :param options: Extra options passed to the
      :class:`~werkzeug.routing.Rule` object.
docstr_tok: ["Decorate","a","view","function","to","register","it","with","the","given","URL","rule","and","options",".","Calls",":","meth",":","`","add_url_rule","`",",","which","has","more","details","about","the","implementation",".","..","code-block",":",":","python","@","app.route","(","``","\/","''",")","def","index","(",")",":","return","``","Hello",",","World","!","''","See",":","ref",":","`","url-route-registrations","`",".","The","endpoint","name","for","the","route","defaults","to","the","name","of","the","view","function","if","the","``","endpoint","``","parameter","is","n't","passed",".","The","``","methods","``","parameter","defaults","to","``","[","``","GET","''","]","``",".","``","HEAD","``","and","``","OPTIONS","``","are","added","automatically",".",":","param","rule",":","The","URL","rule","string",".",":","param","options",":","Extra","options","passed","to","the",":","class",":","`","~werkzeug.routing.Rule","`","object","."]
code: def route(
      self, rule: str, **options: t.Any
  ) -> t.Callable[[T_route], T_route]:
      """Decorate a view function to register it with the given URL
      rule and options. Calls :meth:`add_url_rule`, which has more
      details about the implementation.
  
      .. code-block:: python
  
          @app.route("/")
          def index():
              return "Hello, World!"
  
      See :ref:`url-route-registrations`.
  
      The endpoint name for the route defaults to the name of the view
      function if the ``endpoint`` parameter isn't passed.
  
      The ``methods`` parameter defaults to ``["GET"]``. ``HEAD`` and
      ``OPTIONS`` are added automatically.
  
      :param rule: The URL rule string.
      :param options: Extra options passed to the
          :class:`~werkzeug.routing.Rule` object.
      """
  
      def decorator(f: T_route) -> T_route:
          endpoint = options.pop("endpoint", None)
          self.add_url_rule(rule, endpoint, f, **options)
          return f
  
      return decorator
  
imports: from __future__ import annotations
  import importlib.util
  import os
  import pathlib
  import sys
  import typing
  from collections import defaultdict
  from functools import update_wrapper
  from jinja2 import FileSystemLoader
  from werkzeug.exceptions import default_exceptions
  from werkzeug.exceptions import HTTPException
  from werkzeug.utils import cached_property
  from ..None import typing
  from ..cli import AppGroup
  from ..helpers import get_root_path
  from ..templating import _default_template_ctx_processor
label_desc: Use image node_id 16 for calling the Scaffold obj's underlying member method code with example usage: obj.route(rule) and returns: decorator, f