stache-ai-ocr
OCR support for Stache AI document loaders.
Provides a high-priority PDF loader that falls back to OCR for scanned documents.
Installation
pip install stache-ai-ocr
apt install ocrmypdf # System dependency required
Usage
Once installed, the OCR loader automatically registers and takes priority over the basic PDF loader for all PDF files.
The loader will:
- First attempt normal text extraction with pdfplumber
- If no text is found (scanned PDF), fall back to OCR using ocrmypdf
- Gracefully handle missing ocrmypdf (logs warning and returns empty text)
System Requirements
- ocrmypdf system binary must be installed
- Ubuntu/Debian:
apt install ocrmypdf - macOS:
brew install ocrmypdf - Includes Tesseract OCR engine
- Ubuntu/Debian:
Priority Override
This loader registers with priority 10, overriding the basic PDF loader (priority 0). This ensures OCR is used when available without affecting systems where it's not installed.
Metadata
Release files for stache-ai-ocr 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stache_ai_ocr-0.1.3.tar.gz | 12.2 kB | Without provenance | Details for stache_ai_ocr-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stache_ai_ocr-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for stache_ai_ocr-0.1.3-py3-none-any.whl |
Total release size: 17.8 kB
Release files / stache_ai_ocr-0.1.3.tar.gz
| Download URL | stache_ai_ocr-0.1.3.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f826ff9a875295000267e1ec1b451a77dfa7a3fc86b978abf550afd6feed7cd1
|
|
BLAKE2b-256 checksum How to use checksums |
4cd31bc177db18b01b1d537ace9791f32bfa96fd36e7fc6f7596997dd24c9206
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / stache_ai_ocr-0.1.3-py3-none-any.whl
| Download URL | stache_ai_ocr-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
967f7f7d118ee0b76c97ce6c56916211112838c3bca3d83dd4ca8c34001fb117
|
|
BLAKE2b-256 checksum How to use checksums |
290d4a5a3b1d4afccf3f300f0beedfae4ca857ab85eea987ce14d433f161e1b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for stache-ai-ocr 0.1.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.