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.
Metadata
Release files for langchain-synapsoft 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_synapsoft-0.1.0.tar.gz | 16.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_synapsoft-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.9 kB
Release files / langchain_synapsoft-0.1.0.tar.gz
| Download URL | langchain_synapsoft-0.1.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0e74c7b9d40ce3ca6eec7a6acda22e8fbfad402f9ce9a23aec8c41dae3ae077
|
|
BLAKE2b-256 checksum How to use checksums |
09447170120d7d58d2a17517412e345b7f71f89af77e910e18b84c0d9be76b6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 7, 2026.
Transparency logRelease files / langchain_synapsoft-0.1.0-py3-none-any.whl
| Download URL | langchain_synapsoft-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
612a9d6d05938059fab0aceb6a3903778b21897c4b61889db71021e6efee1348
|
|
BLAKE2b-256 checksum How to use checksums |
ec2529c11df8475b8157883d5c857be0f82b13086b5e13ca030a47c0ed513b24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 7, 2026.
Transparency log