Home / File/ pdf.py — langchain Source File

pdf.py — langchain Source File

Architecture documentation for pdf.py, a python file in the langchain codebase. 4 imports, 0 dependents.

File python CoreAbstractions Serialization 4 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  20af4517_7be6_0830_f9c8_86216c4ba067["pdf.py"]
  8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"]
  20af4517_7be6_0830_f9c8_86216c4ba067 --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3
  439a4142_6fa6_fe9a_2cba_7c9fb0cdceb7["langchain_classic._api"]
  20af4517_7be6_0830_f9c8_86216c4ba067 --> 439a4142_6fa6_fe9a_2cba_7c9fb0cdceb7
  1c9358b6_c985_3c85_5382_b0cfd1a3409c["langchain_community.document_loaders"]
  20af4517_7be6_0830_f9c8_86216c4ba067 --> 1c9358b6_c985_3c85_5382_b0cfd1a3409c
  9199bc6a_4c44_47a8_66e6_24d562e0dc15["langchain_community.document_loaders.pdf"]
  20af4517_7be6_0830_f9c8_86216c4ba067 --> 9199bc6a_4c44_47a8_66e6_24d562e0dc15
  style 20af4517_7be6_0830_f9c8_86216c4ba067 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from typing import TYPE_CHECKING, Any

from langchain_classic._api import create_importer

if TYPE_CHECKING:
    from langchain_community.document_loaders import (
        AmazonTextractPDFLoader,
        MathpixPDFLoader,
        OnlinePDFLoader,
        PagedPDFSplitter,
        PDFMinerLoader,
        PDFMinerPDFasHTMLLoader,
        PDFPlumberLoader,
        PyMuPDFLoader,
        PyPDFDirectoryLoader,
        PyPDFium2Loader,
        UnstructuredPDFLoader,
    )
    from langchain_community.document_loaders.pdf import (
        BasePDFLoader,
        DocumentIntelligenceLoader,
    )

# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
    "UnstructuredPDFLoader": "langchain_community.document_loaders",
    "BasePDFLoader": "langchain_community.document_loaders.pdf",
    "OnlinePDFLoader": "langchain_community.document_loaders",
    "PagedPDFSplitter": "langchain_community.document_loaders",
    "PyPDFium2Loader": "langchain_community.document_loaders",
    "PyPDFDirectoryLoader": "langchain_community.document_loaders",
    "PDFMinerLoader": "langchain_community.document_loaders",
    "PDFMinerPDFasHTMLLoader": "langchain_community.document_loaders",
    "PyMuPDFLoader": "langchain_community.document_loaders",
    "MathpixPDFLoader": "langchain_community.document_loaders",
    "PDFPlumberLoader": "langchain_community.document_loaders",
    "AmazonTextractPDFLoader": "langchain_community.document_loaders",
    "DocumentIntelligenceLoader": "langchain_community.document_loaders.pdf",
}

_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)


def __getattr__(name: str) -> Any:
    """Look up attributes dynamically."""
    return _import_attribute(name)


__all__ = [
    "AmazonTextractPDFLoader",
    "BasePDFLoader",
    "DocumentIntelligenceLoader",
    "MathpixPDFLoader",
    "OnlinePDFLoader",
    "PDFMinerLoader",
    "PDFMinerPDFasHTMLLoader",
    "PDFPlumberLoader",
    "PagedPDFSplitter",
    "PyMuPDFLoader",
    "PyPDFDirectoryLoader",
    "PyPDFium2Loader",
    "UnstructuredPDFLoader",
]

Subdomains

Dependencies

  • langchain_classic._api
  • langchain_community.document_loaders
  • langchain_community.document_loaders.pdf
  • typing

Frequently Asked Questions

What does pdf.py do?
pdf.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, Serialization subdomain.
What functions are defined in pdf.py?
pdf.py defines 2 function(s): __getattr__, langchain_community.
What does pdf.py depend on?
pdf.py imports 4 module(s): langchain_classic._api, langchain_community.document_loaders, langchain_community.document_loaders.pdf, typing.
Where is pdf.py in the architecture?
pdf.py is located at libs/langchain/langchain_classic/document_loaders/pdf.py (domain: CoreAbstractions, subdomain: Serialization, directory: libs/langchain/langchain_classic/document_loaders).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free