openextract

Files in.
Typed data out.

Turn files into validated Pydantic models.

pip install openextract

Your schema. One function.

from decimal import Decimal
from pydantic import BaseModel
from openextract import extract

class Invoice(BaseModel):
    total: Decimal

invoice = extract(
    Invoice,
    "openai:gpt-5",
    "Total due: 120.00",
)
print(invoice.total)

Expected total: Decimal("120.00").