Skip to main content
A data processing pipeline that validates input and routes to different handlers based on the result. Only the matching branch executes.

Workflow

pipeline.py

How It Works

  1. validate_data — checks email and age, returns “valid”, “minor”, or “invalid”
  2. process_adult, process_minor, or log_invalid — only the matching branch runs (when condition)

Running

The output will be: