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.2

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.2
File Size Uploaded Provenance
hawser_ai-0.1.2.tar.gz 230.3 kB With provenance Details

Built distribution (wheel)

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

Total release size: 487.7 kB

Release files / hawser_ai-0.1.2.tar.gz

Download URL hawser_ai-0.1.2.tar.gz
Size 230.3 kB
Tags Source
SHA-256 checksum
How to use checksums
10f5de81cfd9f8434ea0af570dc728f4182eba6f2cf6c30399c9a76eef7fd839
BLAKE2b-256 checksum
How to use checksums
41060ef980ee4bb72cbe281bb14fe6f7260a60fefd436018884723a2b56ac3a2
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.2-py3-none-any.whl

Download URL hawser_ai-0.1.2-py3-none-any.whl
Size 257.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e9d9f1a985ed5a5f90ea5d56c8beec74fc7a6d6a48357528f2b5cba471c7939
BLAKE2b-256 checksum
How to use checksums
6643129b073337a06357145dee88d80fb7fe5da57b6285fad430fc366daa8c87
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.2

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.2.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