Runnable example

Resilient batch data pipeline

Build an isolated, bounded data batch processing pipeline with error recovery using the standard library.

Beginner10–15 minAutomationPython 3.11+ · Standard library only

The problem

Batch jobs receive semi-structured input where one malformed record cannot be allowed to kill the run. A resilient pipeline isolates failures, validates field types, and produces a structured summary of what succeeded and what failed.

The contract

  1. Isolate per-record failures so one bad record never aborts the batch.
  2. Validate field types before processing and collect structured errors.
  3. Generate structured run summaries of successes and failures without crashing.

Verify it locally

From the root of the FlyPython repository, reproduce the broken starter first, then verify the reviewed solution:

python examples/structured-pipeline/verify.py starter --expect-failure
python examples/structured-pipeline/verify.py solution

Hand it to a coding agent

  1. Clone the repository and reproduce the starter failure with the command above.
  2. Give the task contract ↗ to your coding agent and allow changes only in starter/pipeline.py.
  3. Run python examples/structured-pipeline/verify.py starter and treat any failure as unfinished work.
  4. Compare the patch with the reference solution ↗ — the goal is the same contract with a small, readable diff, not identical syntax.

Keep going

Where this example sits in the roadmap.

Reviewed 2026-09-02 · Repository content version 1. Continue with the related learning path, the repository directory, or the MCP migration guide for the specification background.