langchain-docling-rs 2.34.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,52 @@
1
+ /target
2
+
3
+ # Stray CLI conversion outputs (`docling-rs --to dclx <file>` writes next to CWD)
4
+ /*.dclx
5
+
6
+ # ONNX Runtime profiler output (written to CWD when session profiling is on)
7
+ onnxruntime_profile_*.json
8
+
9
+ # wasm-bindgen output for the docling-wasm demo (built from source, see its README)
10
+ crates/docling-wasm/www/pkg/
11
+ # ML models the scan demo fetches same-origin (download_dependencies.sh, run in www/)
12
+ crates/docling-wasm/www/models
13
+
14
+ # Secrets — never commit (holds CARGO_REGISTRY_TOKEN)
15
+ .env
16
+ .env.*
17
+ # …but the documented template for docling-rag config is committed.
18
+ !.env.example
19
+
20
+ # Local RAG vector store (default RAG_DATABASE_URL=sqlite://data/rag.db)
21
+ /data/
22
+
23
+ # Python virtual environments (venv) — not committed, but can be created from requirements.txt
24
+ /.venv*
25
+
26
+ # Downloaded native libs / models (not committed). No trailing slash: a
27
+ # `name/` pattern matches directories only, and git sees a symlink (e.g.
28
+ # crates/docling-wasm/www/.models -> the root .models) as a file.
29
+ .pdfium
30
+ *.onnx
31
+ .models
32
+
33
+ # Python bytecode cache from the comparison scripts
34
+ __pycache__/
35
+ *.pyc
36
+
37
+ # Local docling scratch dir for this migration work
38
+ /scratch-gt/
39
+
40
+ # Benchmarks for GPU (not committed, large and reproducible)
41
+ /bench-gpu/
42
+
43
+ # docling-py is a standalone crate (own workspace) — its build dirs
44
+ crates/docling-py/target/
45
+ crates/docling-py/.venv/
46
+ crates/docling-py/python/docling_rs/*.so
47
+
48
+ # docling's .dclx loader extracts each archive it reads next to the file
49
+ tests/data/**/*_artifacts/
50
+ tests/data/**/groundtruth_dclx/tests/
51
+ # docling-parse renderer plugin (#478, scripts/install/build_docling_parse_render.sh)
52
+ .docling-parse
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.5
2
+ Name: langchain-docling-rs
3
+ Version: 2.34.0
4
+ Summary: LangChain document loader for docling.rs: PDF with layout, tables and OCR, DOCX, PPTX, XLSX, HTML and 40-odd formats into LangChain Documents, chunked with docling's metadata. docling in Rust, langchain-docling's API.
5
+ Project-URL: Homepage, https://github.com/docling-project/docling.rs
6
+ Project-URL: Repository, https://github.com/docling-project/docling.rs
7
+ Project-URL: Documentation, https://github.com/docling-project/docling.rs/blob/master/crates/docling-py/README.md#langchain
8
+ Project-URL: Issues, https://github.com/docling-project/docling.rs/issues
9
+ License: MIT
10
+ Keywords: chunking,docling,document-conversion,document-loader,langchain,langchain-docling,llm,ocr,pdf-to-markdown,rag
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Rust
16
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
18
+ Requires-Python: >=3.9
19
+ Requires-Dist: docling-rs[langchain]==2.34.0
20
+ Description-Content-Type: text/markdown
21
+
22
+ # langchain-docling-rs
23
+
24
+ A [LangChain](https://python.langchain.com) document loader backed by
25
+ [docling.rs](https://github.com/docling-project/docling.rs), a Rust port of
26
+ IBM's [docling](https://github.com/docling-project/docling): PDF with layout
27
+ analysis, table structure and local OCR, DOCX, PPTX, XLSX, HTML, EPUB, e-mail,
28
+ scans and 40-odd other formats, into LangChain `Document`s — one per input as
29
+ Markdown, or one per chunk with docling's chunk metadata (items, page and
30
+ bounding-box provenance, headings). No PyTorch; the models run through ONNX
31
+ Runtime from a single native wheel.
32
+
33
+ It is `langchain-docling`'s API, so the import is the only change:
34
+
35
+ ```bash
36
+ pip install langchain-docling-rs
37
+ ```
38
+
39
+ ```python
40
+ # was: from langchain_docling import DoclingLoader, ExportType
41
+ from langchain_docling_rs import DoclingLoader, ExportType
42
+
43
+ docs = DoclingLoader(file_path=["https://arxiv.org/pdf/2408.09869", "notes.docx"]).load()
44
+ docs[0].page_content # heading path + chunk text, ready to embed
45
+ docs[0].metadata["dl_meta"] # docling's chunk meta: items, page/bbox provenance, headings
46
+
47
+ DoclingLoader(file_path="report.pdf", export_type=ExportType.MARKDOWN).load() # one Document per input
48
+ ```
49
+
50
+ The package has no code of its own: it pins the `docling-rs` wheel (with its
51
+ `langchain` extra) and re-exports
52
+ [`docling_rs.langchain`](https://github.com/docling-project/docling.rs/blob/master/crates/docling-py/README.md#langchain)
53
+ — `DoclingLoader`, `ExportType`, `MetaExtractor`, `BaseMetaExtractor`,
54
+ `ConversionBackend` and `PictureDescriptionLangChainOptions` (describe
55
+ document pictures with any LangChain chat model during conversion). The
56
+ parameters, defaults and chunking are documented there; `pip install
57
+ "docling-rs[langchain]"` and `from docling_rs.langchain import …` is the same
58
+ thing under the engine's own name.
59
+
60
+ ## PDF models
61
+
62
+ Office, HTML, Markdown and e-mail need no models. PDFs and images use ONNX
63
+ models for layout, tables and OCR (~720 MB), fetched once with
64
+ `python -c "import docling_rs; docling_rs.download_models()"`. Without them a
65
+ PDF converts from its embedded text layer.
66
+
67
+ ## License
68
+
69
+ MIT. docling.rs is an independent project of the
70
+ [docling](https://github.com/docling-project) community (LF AI & Data); not a
71
+ LangChain partner package.
@@ -0,0 +1,50 @@
1
+ # langchain-docling-rs
2
+
3
+ A [LangChain](https://python.langchain.com) document loader backed by
4
+ [docling.rs](https://github.com/docling-project/docling.rs), a Rust port of
5
+ IBM's [docling](https://github.com/docling-project/docling): PDF with layout
6
+ analysis, table structure and local OCR, DOCX, PPTX, XLSX, HTML, EPUB, e-mail,
7
+ scans and 40-odd other formats, into LangChain `Document`s — one per input as
8
+ Markdown, or one per chunk with docling's chunk metadata (items, page and
9
+ bounding-box provenance, headings). No PyTorch; the models run through ONNX
10
+ Runtime from a single native wheel.
11
+
12
+ It is `langchain-docling`'s API, so the import is the only change:
13
+
14
+ ```bash
15
+ pip install langchain-docling-rs
16
+ ```
17
+
18
+ ```python
19
+ # was: from langchain_docling import DoclingLoader, ExportType
20
+ from langchain_docling_rs import DoclingLoader, ExportType
21
+
22
+ docs = DoclingLoader(file_path=["https://arxiv.org/pdf/2408.09869", "notes.docx"]).load()
23
+ docs[0].page_content # heading path + chunk text, ready to embed
24
+ docs[0].metadata["dl_meta"] # docling's chunk meta: items, page/bbox provenance, headings
25
+
26
+ DoclingLoader(file_path="report.pdf", export_type=ExportType.MARKDOWN).load() # one Document per input
27
+ ```
28
+
29
+ The package has no code of its own: it pins the `docling-rs` wheel (with its
30
+ `langchain` extra) and re-exports
31
+ [`docling_rs.langchain`](https://github.com/docling-project/docling.rs/blob/master/crates/docling-py/README.md#langchain)
32
+ — `DoclingLoader`, `ExportType`, `MetaExtractor`, `BaseMetaExtractor`,
33
+ `ConversionBackend` and `PictureDescriptionLangChainOptions` (describe
34
+ document pictures with any LangChain chat model during conversion). The
35
+ parameters, defaults and chunking are documented there; `pip install
36
+ "docling-rs[langchain]"` and `from docling_rs.langchain import …` is the same
37
+ thing under the engine's own name.
38
+
39
+ ## PDF models
40
+
41
+ Office, HTML, Markdown and e-mail need no models. PDFs and images use ONNX
42
+ models for layout, tables and OCR (~720 MB), fetched once with
43
+ `python -c "import docling_rs; docling_rs.download_models()"`. Without them a
44
+ PDF converts from its embedded text layer.
45
+
46
+ ## License
47
+
48
+ MIT. docling.rs is an independent project of the
49
+ [docling](https://github.com/docling-project) community (LF AI & Data); not a
50
+ LangChain partner package.
@@ -0,0 +1,42 @@
1
+ # PyPI distribution `langchain-docling-rs`: the LangChain integration under
2
+ # the `langchain-<provider>` name LangChain's integration listing expects.
3
+ # It has no code of its own — the loader is `docling_rs.langchain`, compiled
4
+ # into the docling-rs wheel — so this package only pins that wheel (with its
5
+ # `langchain` extra) and re-exports the names `langchain_docling` has.
6
+ # pypi-publish.yml writes the release version into `version` and into the
7
+ # docling-rs pin before building; the committed values are placeholders
8
+ # (install locally with `pip install --no-deps`).
9
+ [build-system]
10
+ requires = ["hatchling>=1.24"]
11
+ build-backend = "hatchling.build"
12
+
13
+ [project]
14
+ name = "langchain-docling-rs"
15
+ version = "2.34.0"
16
+ description = "LangChain document loader for docling.rs: PDF with layout, tables and OCR, DOCX, PPTX, XLSX, HTML and 40-odd formats into LangChain Documents, chunked with docling's metadata. docling in Rust, langchain-docling's API."
17
+ readme = "README.md"
18
+ license = { text = "MIT" }
19
+ requires-python = ">=3.9"
20
+ keywords = [
21
+ "langchain", "langchain-docling", "document-loader", "docling", "rag",
22
+ "pdf-to-markdown", "document-conversion", "ocr", "chunking", "llm",
23
+ ]
24
+ classifiers = [
25
+ "Development Status :: 4 - Beta",
26
+ "Intended Audience :: Developers",
27
+ "License :: OSI Approved :: MIT License",
28
+ "Programming Language :: Python :: 3",
29
+ "Programming Language :: Rust",
30
+ "Topic :: Text Processing :: Markup :: Markdown",
31
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
32
+ ]
33
+ dependencies = ["docling-rs[langchain]==2.34.0"]
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/docling-project/docling.rs"
37
+ Repository = "https://github.com/docling-project/docling.rs"
38
+ Documentation = "https://github.com/docling-project/docling.rs/blob/master/crates/docling-py/README.md#langchain"
39
+ Issues = "https://github.com/docling-project/docling.rs/issues"
40
+
41
+ [tool.hatch.build.targets.wheel]
42
+ packages = ["src/langchain_docling_rs"]
@@ -0,0 +1,28 @@
1
+ """LangChain integration for docling.rs — ``langchain-docling``'s API on the
2
+ Rust engine. The implementation is :mod:`docling_rs.langchain`, shipped in
3
+ the ``docling-rs`` wheel; this distribution gives it the ``langchain-<provider>``
4
+ name LangChain's integration listing expects and re-exports its names::
5
+
6
+ # was: from langchain_docling import DoclingLoader, ExportType
7
+ from langchain_docling_rs import DoclingLoader, ExportType
8
+
9
+ docs = DoclingLoader(file_path="https://arxiv.org/pdf/2408.09869").load()
10
+ """
11
+
12
+ from docling_rs.langchain import (
13
+ BaseMetaExtractor,
14
+ ConversionBackend,
15
+ DoclingLoader,
16
+ ExportType,
17
+ MetaExtractor,
18
+ PictureDescriptionLangChainOptions,
19
+ )
20
+
21
+ __all__ = [
22
+ "BaseMetaExtractor",
23
+ "ConversionBackend",
24
+ "DoclingLoader",
25
+ "ExportType",
26
+ "MetaExtractor",
27
+ "PictureDescriptionLangChainOptions",
28
+ ]