Metadata-Version: 2.5
Name: docspectra
Version: 0.1.0
Summary: DocSpectra: schema-driven document parsing — any file in, spectral JSON out
Project-URL: Homepage, https://github.com/flowjzh/docspectra
Project-URL: Repository, https://github.com/flowjzh/docspectra.git
Project-URL: Issues, https://github.com/flowjzh/docspectra/issues
Author-email: Flow Jiang <flowjzh@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: documents,extraction,json-schema,llm,parsing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: jsonschema>=4.23
Requires-Dist: opentelemetry-api>=1.40.0
Requires-Dist: xtremeparse>=0.1.0
Provides-Extra: anydoc
Requires-Dist: firecrawl-anydoc; extra == 'anydoc'
Requires-Dist: pypdf; extra == 'anydoc'
Provides-Extra: mineru
Requires-Dist: httpx>=0.27; extra == 'mineru'
Requires-Dist: xtremeflow>=0.4.4; extra == 'mineru'
Provides-Extra: pdf-inspect
Requires-Dist: pdf-inspector; extra == 'pdf-inspect'
Requires-Dist: pypdf; extra == 'pdf-inspect'
Provides-Extra: pydantic-ai
Requires-Dist: pydantic-ai-slim[openai]>=2.30.0; extra == 'pydantic-ai'
Description-Content-Type: text/markdown

# DocSpectra

<img width="600" alt="DocSpectra" src="https://github.com/user-attachments/assets/1d858fb3-67c5-41f6-b0db-3fb6ab39fe4a" />

> **Any file in. Spectral JSON out. Fast.**

DocSpectra is a schema-driven document-parsing library: hand it a file in
any supported format and a JSON Schema, get back schema-conforming JSON —
extracted by extreme-concurrency LLM specialists that chunk, route, fan
out and self-correct (powered by
[xtremeparse](https://github.com/flowjzh/xtremeparse)).

```
file + JSON schema ──► docspectra.parse ──► JSON
```

## Layout

- `docspectra/parser` — file → text (provider engines as optional extras:
  `pdf-inspect`, `anydoc`, `mineru`; magic-byte type routing;
  file-level decline chains — a provider whose gate fires on a specific
  file declines and the next engine takes it)
- `docspectra/agents` — the only PydanticAI boundary (AgentRunner adapter)
- `docspectra/service` — `parse`: file + JSON schema → JSON

DocSpectra is deliberately generic: JSON Schema in and out, no document
vendors, no HTTP server, no domain tools. Applications assemble it with
their own schema sources and renderers (e.g. bridging
[DocXCast](https://github.com/flowjzh/docxcast) templates).

## Status

Parser layer implemented and tested.
