Skip to main content

Hawser

Pull data out of documents and images with AI, and get proof for every value.

You give Hawser a file (a PDF, a scan, a photo) and describe the data you want. An AI model reads the file and fills in your fields, and Hawser checks the answer before you get it:

  • Every value comes with proof: the page and the exact spot on the page where it was found.
  • No guessing: a value that isn't in the document is marked unknown, never invented.
  • A clear verdict: a result is accepted only when every check passes; otherwise it is needs_review and a person can fix and approve it.

Open source (Apache-2.0); runs on your own machine or server; works with Claude, GPT, Gemini and local models.

Install

pip install "hawser-ai[ocr]"

The command and the Python import are both hawser. [ocr] adds a local OCR engine for scans and photos (on Linux it also needs sudo apt-get install libgl1). Python 3.12+.

Try it (no API key needed)

mkdir my-project && cd my-project
hawser init          # creates a sample invoice, its schema and a saved model answer
hawser quickstart    # processes it offline, prints each field with its page and position

Use it in your code

import hawser
from pydantic import BaseModel


class Invoice(BaseModel):
    invoice_number: str
    vendor_name: str
    total: float


result = hawser.run(
    "Extract the invoice.",
    inputs=["invoice.pdf"],
    output_schema=Invoice,
    models="openrouter/anthropic/claude-haiku-5.5",  # needs OPENROUTER_API_KEY
)

if result.status == "accepted":
    print(result.parse_as(Invoice).total)
    for proof in result.evidence_for("/total"):
        print("Found on page", proof.page, "as", repr(proof.text))
else:
    for issue in result.validation.issues:  # status is needs_review, rejected or failed
        print(issue.field, issue.message)

Set ANTHROPIC_API_KEY, OPENROUTER_API_KEY or OPENAI_API_KEY for the provider you use; hawser models list shows every model ID and its price.

More

Metadata

Release files for hawser-ai 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hawser-ai 0.1.0
File Size Uploaded Provenance
hawser_ai-0.1.0.tar.gz 225.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hawser-ai 0.1.0
File Interpreter ABI Platform
hawser_ai-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 478.9 kB

Release files / hawser_ai-0.1.0.tar.gz

Download URL hawser_ai-0.1.0.tar.gz
Size 225.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5aad56462e02cbe53f1ea3c85c6452b27224a67931299f38e67439aec92f14ce
BLAKE2b-256 checksum
How to use checksums
d8c760a4bc7040e854efd12940cfebb0fc9888420b1839fa2b10acf0465b8fe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / hawser_ai-0.1.0-py3-none-any.whl

Download URL hawser_ai-0.1.0-py3-none-any.whl
Size 253.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6ffe168b46fc4b31a424f19df8fda0633c36b741ea8021f71c7863864a753ed
BLAKE2b-256 checksum
How to use checksums
e18617f22134511e1c759671dec6815db57f074e33dce06d389bac5386532897
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for hawser-ai 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hawser_ai-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page