LangChain integration package for Synap DocuAnalyzer.
Project description
langchain-synapsoft
langchain-synapsoft is a standalone LangChain integration package for Synap DocuAnalyzer.
It exposes a small, focused public surface:
SynapDocuAnalyzerClientfor the REST workflowSynapDocuAnalyzerLoaderfor converting parsed pages into LangChainDocumentobjectsSynapDocuAnalyzerToolfor agent-facing document conversion
The package currently targets the verified upload -> poll -> result flow and is prepared for the 0.1.0 alpha release.
After the 0.1.0 GitHub release is published to PyPI, you can install and integrate this package directly in your own project. Access to a live Synap DocuAnalyzer deployment is managed separately: installing the package does not grant service access, and API keys plus usage quotas are provisioned by Synapsoft.
Installation
Install from PyPI after the 0.1.0 release:
pip install -U langchain-synapsoft
Install for local development:
python -m pip install -e ".[dev]"
This package is intended to be easy to adopt in customer projects. After publication, pip install is enough to add the integration client, but using the Synap DocuAnalyzer service itself still requires a separately issued API key and an agreed usage policy from Synapsoft.
Environment
To call a live Synap DocuAnalyzer service, langchain-synapsoft expects a base URL and API key.
export SYNAP_DA_BASE_URL="https://your-docuanalyzer-host"
export SYNAP_DA_API_KEY="your-api-key"
$env:SYNAP_DA_BASE_URL = "https://your-docuanalyzer-host"
$env:SYNAP_DA_API_KEY = "your-api-key"
Quickstart: Loader
from langchain_synapsoft import SynapDocuAnalyzerLoader
loader = SynapDocuAnalyzerLoader(
file_path="sample.pdf",
base_url="https://your-docuanalyzer-host",
api_key="your-api-key",
output_type="md",
mode="page",
)
docs = loader.load()
print(len(docs))
print(docs[0].metadata)
print(docs[0].page_content[:300])
The loader returns one Document per page by default. Use mode="single_document" to join every page into one Document.
If your deployment requires a longer request timeout or skips TLS verification for an internal certificate chain, pass request_timeout= and verify_ssl= when creating the loader.
Quickstart: Tool
from langchain_synapsoft import SynapDocuAnalyzerTool
tool = SynapDocuAnalyzerTool(
base_url="https://your-docuanalyzer-host",
api_key="your-api-key",
)
content = tool.invoke({"file_path": "sample.pdf", "output_type": "md"})
print(content[:300])
Supported behavior
- Auto-detects both root-style endpoints such as
/monitorand legacy/api/monitordeployments - Uses the verified Synap page result contract behind a simple Python API
- Pretty-prints JSON page responses while preserving the raw payload in
PageResult.raw_payload - Includes focused unit tests plus an opt-in live smoke test for a real server
Current limitations
- Asset ZIP download flows are intentionally out of the public API surface for now
- Remote delete endpoints are not exposed yet
- Live integration tests require a reachable Synap DocuAnalyzer deployment and credentials
Development
From a repository checkout, create and activate a virtual environment, then install the development dependencies:
python -m venv .venv
python -m pip install -U pip
python -m pip install -e ".[dev]"
Run the local checks:
python -m ruff check .
python -m pytest -q
synap-docuanalyzer-smoke --sample-file "path/to/sample.docx"
To run the opt-in live pytest target, set SYNAP_DA_BASE_URL, SYNAP_DA_API_KEY, and SYNAP_SAMPLE_FILE, then run:
python -m pytest -q -m live_server
synap-docuanalyzer-smoke --sample-file "$SYNAP_SAMPLE_FILE"
Repository guide
- CONTRIBUTING.md explains local setup, validation, and pull request expectations.
- docs/README.md links the public package docs in this repository.
- docs/API_CONTRACT.md documents the verified REST surface used by this package.
- examples/loader_basic.py and examples/tool_basic.py are minimal runnable examples.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_synapsoft-0.1.0.tar.gz.
File metadata
- Download URL: langchain_synapsoft-0.1.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0e74c7b9d40ce3ca6eec7a6acda22e8fbfad402f9ce9a23aec8c41dae3ae077
|
|
| MD5 |
10fe7f20ab3d3685d305932f6d823122
|
|
| BLAKE2b-256 |
09447170120d7d58d2a17517412e345b7f71f89af77e910e18b84c0d9be76b6b
|
Provenance
The following attestation bundles were made for langchain_synapsoft-0.1.0.tar.gz:
Publisher:
publish.yml on synapsoft-DA/langchain-synapsoft
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_synapsoft-0.1.0.tar.gz -
Subject digest:
a0e74c7b9d40ce3ca6eec7a6acda22e8fbfad402f9ce9a23aec8c41dae3ae077 - Sigstore transparency entry: 1456811467
- Sigstore integration time:
-
Permalink:
synapsoft-DA/langchain-synapsoft@5e455e23ce3226cb0bad6fe98b0ae0fd5e3b45f8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/synapsoft-DA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e455e23ce3226cb0bad6fe98b0ae0fd5e3b45f8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file langchain_synapsoft-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_synapsoft-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
612a9d6d05938059fab0aceb6a3903778b21897c4b61889db71021e6efee1348
|
|
| MD5 |
4fb4a129f95aac08124c55aae65f9cf8
|
|
| BLAKE2b-256 |
ec2529c11df8475b8157883d5c857be0f82b13086b5e13ca030a47c0ed513b24
|
Provenance
The following attestation bundles were made for langchain_synapsoft-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on synapsoft-DA/langchain-synapsoft
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_synapsoft-0.1.0-py3-none-any.whl -
Subject digest:
612a9d6d05938059fab0aceb6a3903778b21897c4b61889db71021e6efee1348 - Sigstore transparency entry: 1456811581
- Sigstore integration time:
-
Permalink:
synapsoft-DA/langchain-synapsoft@5e455e23ce3226cb0bad6fe98b0ae0fd5e3b45f8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/synapsoft-DA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e455e23ce3226cb0bad6fe98b0ae0fd5e3b45f8 -
Trigger Event:
release
-
Statement type: