Metadata-Version: 2.5
Name: folioiq
Version: 0.1.0
Summary: Schema-driven document extraction with pluggable providers
Project-URL: Homepage, https://github.com/auspicious123/folioiq-sdk
Project-URL: Repository, https://github.com/auspicious123/folioiq-sdk
Project-URL: Issues, https://github.com/auspicious123/folioiq-sdk/issues
Author-email: auspicious123 <auspicious123@users.noreply.github.com>
License: MIT
License-File: LICENSE
Keywords: azure,document-extraction,llm,ocr,pdf,pydantic
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pymupdf>=1.24.0
Requires-Dist: python-dotenv>=1.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: azure
Requires-Dist: azure-ai-documentintelligence>=1.0.0; extra == 'azure'
Requires-Dist: langchain-core>=0.3.0; extra == 'azure'
Requires-Dist: langchain-openai>=0.2.0; extra == 'azure'
Provides-Extra: dev
Requires-Dist: build>=1.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Description-Content-Type: text/markdown

# FolioIQ

[![PyPI](https://img.shields.io/badge/pypi-folioiq-blue)](https://pypi.org/project/folioiq/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

Schema-driven document extraction. YAML spec (+ optional MD) in → structured data out.

```python
from folioiq import DocumentExtractor

extractor = DocumentExtractor.from_env()
result = extractor.extract("invoice.pdf", spec="examples/invoice.yaml")

if result.is_valid:
    print(result.data)
else:
    print(result.validation_errors)
```

## Install

```bash
pip install folioiq
pip install "folioiq[azure]"   # Azure OpenAI + Document Intelligence
```

Or from source:

```bash
git clone https://github.com/auspicious123/folioiq-sdk.git
cd folioiq-sdk
python -m venv .venv && source .venv/bin/activate
pip install -e ".[azure,dev]"
cp .env.example .env   # fill Azure vars
```

## Spec only (no LLM)

```python
spec = extractor.load_spec("examples/invoice.yaml")
Model = extractor.build_model(spec)
```

## Pipeline override (YAML)

```yaml
pipeline:
  mode: explicit
  parser: azure_di   # or pymupdf
```

## Eval

```bash
pip install -e ".[azure,dev]"
folioiq-eval                         # all fixture packs
folioiq-eval tests/fixtures/packs/po
```

## License

MIT — see [LICENSE](LICENSE).

See [PLAN.md](PLAN.md) for design phases.
