Implements the Python SDK with all 9 contract methods, 8 exception classes, type definitions, asyncio wrappers, and subprocess fallback. Changes: - Add Python wrapper module with extract, extract_text, extract_markdown, extract_stream, search, get_metadata, hash, classify, verify_receipt - Add exception hierarchy: PdftractError base class with 7 subclasses - Add dataclass type definitions: Document, Page, Span, Block, Match, Fingerprint, Classification, Metadata - Add asyncio module with async wrappers for 4 long-running methods - Add subprocess fallback for when native module fails to import - Add conformance test runner under tests/test_conformance.py - Update pyproject.toml with dynamic version from Cargo Closes: pdftract-2nu0s
19 lines
385 B
TOML
19 lines
385 B
TOML
[package]
|
|
name = "pdftract-py"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
|
|
[lib]
|
|
name = "pdftract"
|
|
crate-type = ["cdylib"]
|
|
|
|
[dependencies]
|
|
anyhow = "1"
|
|
pdftract-core = { path = "../pdftract-core" }
|
|
pyo3 = { version = "0.20", features = ["extension-module"] }
|
|
|
|
[features]
|
|
default = ["pyo3/extension-module"]
|