Production engineering patterns for automating FOIA and public records workflows — in Python, built for audit and judicial review.
Government agencies live and die by statutory deadlines. A public records request is a legal obligation the instant it arrives: a clock starts, a chain-of-custody begins, and every decision an agency makes about that request may have to be reconstructed years later before an inspector general or a court. This site treats FOIA and open-records automation as exactly what it is — a deterministic compliance engine, not a generic document workflow — and shows you how to build one that holds up under load and under scrutiny.
Every guide ships with runnable, well-structured Python (structured JSON audit logging, explicit exception handling, and inline comments citing the specific statute — e.g. 5 U.S.C. § 552(a)(6)(A)(i)), a hand-drawn architecture or state diagram, a compliance verification checklist, and structured data so the patterns are as defensible as they are practical.
- Government technology teams wiring statutory obligations into real systems
- Records managers who need retention, disposition, and litigation-hold logic that is provably correct
- Compliance officers who have to certify that nothing was dropped, duplicated, or quietly delayed
- Python automation builders shipping intake, retrieval, redaction, and reporting pipelines
The material is organized into three connected areas, each a deep set of production-ready guides.
Capture, validate, prioritize, and route public records requests through a deterministic, idempotent, audit-logged state machine. Covers async queue management, department routing, email & form parsing, priority scoring, and deadline tracking with tiered escalation before a breach.
Retrieve and parse responsive records at scale without breaking chain-of-custody. Covers repository sync, async batch processing, metadata extraction, OCR pipelines, and an irreversible PII redaction pipeline that proves what was withheld and why.
Map statutory obligations directly onto executable code: request taxonomy, records retention scheduling, exemption logic, security boundaries, per-jurisdiction deadline math (California, Texas, New York, and the federal window), and an append-only audit logging architecture with SIEM forwarding.
- Statute-anchored code — every window, tolling rule, and exemption is tied to the citation that drives it
- Audit-first design — append-only, hash-chained event logs aligned to NIST SP 800-53 AU controls
- Irreversible redaction — burn-in and PDF-layer flattening so exempt material never survives in a release copy
- Deadline correctness — business-day math with real holiday calendars, tolling, and litigation-hold freezes
- Decision guides — head-to-head comparisons (Celery vs RQ vs Dramatiq; pdfplumber vs Camelot vs PyMuPDF)
A static site generated with Eleventy, hand-authored inline SVG diagrams, KaTeX, Prism syntax highlighting, and a fully offline-capable PWA. No external CDNs — every asset is served from the site's own origin. Structured data (TechArticle, BreadcrumbList, HowTo, FAQPage) ships on every page.
Start with the area closest to your current work, or read a section end to end:
- Intake & Routing Workflows →
- Document Retrieval & Parsing →
- Core Architecture & Compliance Mapping →
Maintained by the requestautomation project. Contributions, corrections, and jurisdiction-specific additions are welcome — open an issue or a pull request.