Python wrapper for the Ethos document evidence CLI.
Project description
Ethos Python Package
This directory contains the ethos-pdf Python package source for Ethos.
The package exposes a public semver API beginning at 0.1.0 for Python >=3.8. Patch releases
must not break public function signatures, exception classes, or documented return shapes. Minor
releases may add backward-compatible API, and major releases may break API after a release-scope
decision.
Public API:
EthosCliEthosPythonSurfaceErrorEthosNotFoundErrorEthosTimeoutErrorEthosCommandErrorEthosOutputErrorparse_pdf_jsonparse_pdf_markdownparse_pdf_textcrop_element
The current module is intentionally thin: it shells out to a caller-provided local ethos CLI
binary and returns ethos doc parse output or source-bound ethos crop_element JSON. It can pass
caller-provided source PDF and crop artifact directory arguments for rendered crop artifacts. It
does not bundle PDFium, does not publish hosted surfaces, and does not expand parser behavior. The
Rust CLI remains the source of truth.
PDFium-backed parse and crop paths require caller-provided PDFium through
ETHOS_PDFIUM_LIBRARY_PATH. Importing ethos_pdf does not require PDFium. If PDFium is missing,
the underlying CLI error is preserved in EthosCommandError.stderr so callers can show the setup
guidance from docs/pdfium-manual-setup.md.
Run the focused tests with:
make python-surface-test
The tests use a fake local command, so they do not require PDFium.
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 Distributions
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 ethos_pdf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ethos_pdf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04280d851a9f3bfeb4905452e26dcce4000d3a6c597a190e940e4c776d7b935d
|
|
| MD5 |
2a86fe0775433982b63a417941774828
|
|
| BLAKE2b-256 |
909b1af2fdb7fae11915663e32399dbfb7f4754730d128129168d80ee5f8763d
|