PC / Pablo Costa

Court Data Pipeline: Python automation for TRT2/PJe

A Python pipeline delivered to a São Paulo law firm: court communications, explainable filtering, SQLite persistence and Excel reports, with 93 automated tests.

Overview

I delivered this Python pipeline to a São Paulo law firm between April and June 2026. It turns TRT2/PJe court communications into filtered, deduplicated Excel reports for review.

From communications to reviewable reports

The implementation covers API ingestion, defensive parsing, explainable rule-based filtering, SQLite persistence and Excel generation. Retries handle operational failures, and Windows packaging makes the delivered tool usable by non-technical users.

Why explainable filtering matters

The filtering uses explicit rules rather than opaque model decisions. Documentation covers API limitations, false-negative risks and operational behavior. The output remains material for review, not a substitute for professional judgment.

Validation and reported results

The system was validated with 93 automated tests. Explainable filtering reduced the review surface by more than 96% on representative full-day datasets. The percentage describes the reduction in material left for review on those datasets; it is not a measured reduction in working hours or a claim of 96% accuracy.

Scope and limitations

The result applies to this project and its tested datasets, not to every court, date range or workload. No public dataset, detailed benchmark protocol or public code repository is linked here, so this page does not establish independent reproducibility. False-negative risk and API coverage remain relevant when interpreting the result.

Discuss a project with Pablo Costa →