Skip to content

About

PII-aware FastAPI document intelligence service with typed extraction and provenance

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

DocuParse API

A production-shaped document intelligence service for extracting normalized invoice fields with confidence and source provenance. The API keeps the inference core deterministic and independently testable, fingerprints normalized input for deduplication, and redacts common PII from operational logs.

Features

  • FastAPI boundary with typed, bounded requests and OpenAPI docs.
  • Extraction of invoice number, date, contact email, and total.
  • Decimal-safe monetary normalization.
  • Per-field confidence and source evidence.
  • PII-aware logging for email, phone, and SSN-shaped values.
  • Docker image and GitHub Actions checks.

Run

python -m venv .venv && source .venv/bin/activate
pip install -e '.[dev]'
pytest -q
uvicorn app.main:app --reload
curl -X POST localhost:8000/v1/extract \
  -H 'content-type: application/json' \
  -d '{"request_id":"demo-1","text":"INVOICE # AB-1042\nDate: 2026-07-21\nTotal: $149.00"}'

Interactive documentation is available at http://localhost:8000/docs.

Design notes

The extraction engine has no framework dependency, making it cheap to unit test and straightforward to replace with OCR or an LLM provider. The HTTP layer owns validation and observability, while only redacted previews reach logs.

Resume bullet

Built a containerized document-intelligence API with FastAPI and Python, implementing typed extraction with confidence/provenance, monetary normalization, input fingerprinting, and PII-safe logging.

About

PII-aware FastAPI document intelligence service with typed extraction and provenance

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages