Metadata-Version: 2.4
Name: langchain-opendma
Version: 0.1.0
Summary: LangChain document loaders for OpenDMA - integrate ECM systems with LangChain
Keywords: langchain,opendma,ecm,document-loaders
Author: Stefan Kopf
Author-email: Stefan Kopf <s.kopf@xaldon.de>
License-Expression: MIT
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: langchain-core>=1.0.0,<2.0.0
Requires-Dist: opendma-api>=0.8.0
Requires-Dist: opendma-remote>=0.8.0
Requires-Dist: langchain-opendma[unstructured] ; extra == 'all'
Requires-Dist: langchain-opendma[docling] ; extra == 'all'
Requires-Dist: langchain-docling>=1.0.0 ; extra == 'docling'
Requires-Dist: langchain-unstructured>=0.2.0 ; extra == 'unstructured'
Requires-Dist: unstructured-client>=0.28.0 ; extra == 'unstructured'
Requires-Dist: unstructured-inference>=1.2.0,<1.3.0 ; python_full_version < '3.11' and extra == 'unstructured'
Requires-Dist: unstructured-inference>=1.6.10 ; python_full_version >= '3.11' and python_full_version < '3.14' and extra == 'unstructured'
Requires-Dist: unstructured[pdf,doc,docx,ppt,pptx,xlsx,rtf,odt,epub,image,csv,tsv,md,org,rst]>=0.16.0 ; extra == 'unstructured'
Requires-Python: >=3.10, <4
Project-URL: Homepage, https://opendma.org
Project-URL: Repository, https://github.com/OpenDMA/langchain-opendma.git
Project-URL: Documentation, https://github.com/OpenDMA/langchain-opendma/tree/main/docs
Project-URL: Issues, https://github.com/OpenDMA/langchain-opendma/issues
Provides-Extra: all
Provides-Extra: docling
Provides-Extra: unstructured
Description-Content-Type: text/markdown

# LangChain OpenDMA

LangChain document loaders for [OpenDMA](https://opendma.org/).

OpenDMA is a vendor-neutral abstraction layer for enterprise content management
systems. It provides a common API for repositories such as Alfresco, CMOD,
Documentum, FileNet P8, OnBase, SharePoint, and other ECM or document management
platforms. This package connects that API to LangChain by loading OpenDMA
documents as `langchain_core.documents.Document` objects.

Use this package when you want to build LangChain applications, RAG pipelines, or
content analysis workflows on top of documents stored in ECM systems.

## Features

- Load documents from an OpenDMA REST service by document ID, folder ID, or query.
- Preserve OpenDMA and repository metadata on every LangChain `Document`.
- Process plain text content out of the box.
- Process richer document formats with optional Unstructured or Docling handlers.
- Use LangChain's sync and async document loader APIs.

## Installation

Install OpenDMA and this integration from PyPI:

```bash
pip install langchain-opendma
```

Install optional parser integrations when you need Office, PDF, HTML, images, or
other rich formats:

```bash
pip install "langchain-opendma[unstructured]"
pip install "langchain-opendma[docling]"
pip install "langchain-opendma[all]"
```

## Quickstart

```python
from langchain_opendma import OpenDMALoader

loader = OpenDMALoader(
    endpoint="http://localhost:8080/opendma",
    username="admin",
    password="admin",
    repository_id="my-repository",
    document_ids=["some-document-id"],
)

documents = loader.load()

for document in documents:
    print(document.metadata["source"])
    print(document.metadata.get("opendma:Title"))
    print(document.page_content)
```

By default, `OpenDMALoader` handles `text/plain` content. For PDF, Office,
HTML, image, and other rich formats, configure an Unstructured or Docling content
handler. See the [documentation](https://github.com/OpenDMA/langchain-opendma/tree/main/docs/README.md) for details.

## Documentation

- [Tutorials](https://github.com/OpenDMA/langchain-opendma/tree/main/docs/tutorials/README.md): guided LangChain application tutorials
- [Documentation](https://github.com/OpenDMA/langchain-opendma/tree/main/docs/README.md): usage, loader options, and content handlers
- [Examples](https://github.com/OpenDMA/langchain-opendma/tree/main/docs/examples/README.md): runnable examples using the tutorial repository

## Development

This project uses [uv](https://docs.astral.sh/uv/) for dependency management.

```bash
uv sync --all-extras
uv run pytest
uv run ruff check src tests
uv run mypy src tests
```

## Related Projects

- [LangChain](https://python.langchain.com/)
- [OpenDMA](https://opendma.org/)
- [opendma-api](https://pypi.org/project/opendma-api/)
- [opendma-remote](https://pypi.org/project/opendma-remote/)
- [Unstructured](https://unstructured.io/)
- [Docling](https://docling-project.github.io/docling/)
