class_docstr: An Application is a factory for Document instances.
  
      
class_docstr_tok: ["An","Application","is","a","factory","for","Document","instances","."]
docstr: Add a handler to the pipeline used to initialize new documents.
  
  Args:
      handler (Handler) : a handler for this Application to use to
          process Documents
docstr_tok: ["Add","a","handler","to","the","pipeline","used","to","initialize","new","documents",".","Args",":","handler","(","Handler",")",":","a","handler","for","this","Application","to","use","to","process","Documents"]
code: def add(self, handler: Handler) -> None:
      """Add a handler to the pipeline used to initialize new documents.
  
      Args:
          handler (Handler) : a handler for this Application to use to
              process Documents
  
      """
      self._handlers.append(handler)
  
      # make sure there is at most one static path
      static_paths = {h.static_path() for h in self.handlers}
      static_paths.discard(None)
      if len(static_paths) > 1:
          raise RuntimeError(
              "More than one static path requested for app: %r"
              % list(static_paths)
          )
      elif len(static_paths) == 1:
          self._static_path = static_paths.pop()
      else:
          self._static_path = None
  
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 6 for calling the Application obj's underlying member method code with example usage: obj.add(handler) without return types