Skip to main content

Docling LangChain integration

Project description

Docling LangChain integration

PyPI version PyPI - Python Version uv Code style: black Imports: isort Pydantic v2 pre-commit License MIT

A Docling integration for LangChain.

Installation

Simply install langchain-docling from your package manager, e.g. pip:

pip install langchain-docling

Development setup

To develop for Docling Core, you need Python >=3.9 <=3.13 and uv. You can then install from your local clone's root dir:

uv sync

Usage

Basic usage

Basic usage of DoclingLoader looks as follows:

from langchain_docling import DoclingLoader

FILE_PATH = ["https://arxiv.org/pdf/2408.09869"]  # Docling Technical Report

loader = DoclingLoader(file_path=FILE_PATH)
docs = loader.load()

Advanced usage

When initializing a DoclingLoader, you can use the following parameters:

  • file_path: source as single str (URL or local file) or iterable thereof
  • converter (optional): any specific Docling converter instance to use
  • convert_kwargs (optional): any specific kwargs for conversion execution
  • export_type (optional): export mode to use: ExportType.DOC_CHUNKS (default) or ExportType.MARKDOWN
  • md_export_kwargs (optional): any specific Markdown export kwargs (for Markdown mode)
  • chunker (optional): any specific Docling chunker instance to use (for doc-chunk mode)
  • meta_extractor (optional): any specific metadata extractor to use

Docs and examples

For more details and usage examples, check out this page.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_docling-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

langchain_docling-1.0.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file langchain_docling-1.0.0.tar.gz.

File metadata

  • Download URL: langchain_docling-1.0.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for langchain_docling-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c46af24e8d714a245913c9f71b39660c1f664a02dbe36e38ba0997483b8a78d3
MD5 a2fe779b3eba7fd1582f644594d29562
BLAKE2b-256 7520c1212f64b51bdb0d0c2e219c4c6d199f8b4128191cd254c46ae04dd327d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_docling-1.0.0.tar.gz:

Publisher: pypi.yml on docling-project/docling-langchain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langchain_docling-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_docling-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10d37812774e49da58ee7025bdf925bbdfc50691ea925453cd5e2cff6587abe4
MD5 77a01c92de21162af931e4908a88150a
BLAKE2b-256 70b5b528f0e223cc1841f11cd5b894f7cedc98b09b25bfbf074b733bc98f6435

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_docling-1.0.0-py3-none-any.whl:

Publisher: pypi.yml on docling-project/docling-langchain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page