class_docstr: An Application is a factory for Document instances.
  
      
class_docstr_tok: ["An","Application","is","a","factory","for","Document","instances","."]
docstr: Application factory.
  
  Args:
      handlers (seq[Handler]): List of handlers to call.
          The URL is taken from the first one only.
  
  Keyword Args:
      metadata (dict): arbitrary user-supplied JSON data to make available
          with the application.
  
          The server will provide a URL ``http://applicationurl/metadata``
          which returns a JSON blob of the form:
  
          .. code-block:: json
  
              {
                  "data": {
                      "hi": "hi",
                      "there": "there"
                  },
                  "url": "/myapp"
              }
  
          The user-supplied metadata is returned as-is under the
          ``"data"`` key in the blob.
docstr_tok: ["Application","factory",".","Args",":","handlers","(","seq","[","Handler","]",")",":","List","of","handlers","to","call",".","The","URL","is","taken","from","the","first","one","only",".","Keyword","Args",":","metadata","(","dict",")",":","arbitrary","user-supplied","JSON","data","to","make","available","with","the","application",".","The","server","will","provide","a","URL","``","http",":","\/\/applicationurl\/metadata","``","which","returns","a","JSON","blob","of","the","form",":","..","code-block",":",":","json","{","``","data","''",":","{","``","hi","''",":","``","hi","''",",","``","there","''",":","``","there","''","}",",","``","url","''",":","``","\/myapp","''","}","The","user-supplied","metadata","is","returned","as-is","under","the","``","``","data","''","``","key","in","the","blob","."]
code: def __init__(
      self, *handlers: Handler, metadata: dict[str, Any] | None = None
  ) -> None:
      """Application factory.
  
      Args:
          handlers (seq[Handler]): List of handlers to call.
              The URL is taken from the first one only.
  
      Keyword Args:
          metadata (dict): arbitrary user-supplied JSON data to make available
              with the application.
  
              The server will provide a URL ``http://applicationurl/metadata``
              which returns a JSON blob of the form:
  
              .. code-block:: json
  
                  {
                      "data": {
                          "hi": "hi",
                          "there": "there"
                      },
                      "url": "/myapp"
                  }
  
              The user-supplied metadata is returned as-is under the
              ``"data"`` key in the blob.
  
      """
      self._static_path = None
      self._handlers = []
      self._metadata = metadata
      for h in handlers:
          self.add(h)
  
imports: from __future__ import annotations
  import logging
  from abc import ABCMeta, abstractmethod
  from typing import TYPE_CHECKING, Any, Awaitable, Callable, ClassVar
  from ..core.types import ID
  from ..document import Document
  from ..settings import settings
label_desc: Use image node_id 1 to create a new Application object  with example: obj = Application()