Information about whales — an example of streamed structured response validation.
Demonstrates:
This script streams structured responses about whales, validates the data
and displays it as a dynamic table using rich as the data is received.
With dependencies installed and environment variables set, run:
python/uv-run -m pydantic_ai_examples.stream_whalesShould give an output like this:
{{ video('53dd5e7664c20ae90ed90ae42f606bf3', 25) }}
snippet {path="/examples/pydantic_ai_examples/stream_whales.py"}