<aside> 📘

Tutorial 5 of the Kalix tutorial series. You'll drive a Kalix simulation directly from Python using the kalix package, read the outputs as pandas DataFrames, and plot them. Expected time: about 20 minutes.

</aside>

What you'll build

A Jupyter notebook that sits next to your model file and:

This is the foundation for any analysis, scripting, or notebook-driven workflow built on top of Kalix.

image.png

Prerequisites

Project layout

005/
├── data/
│   ├── climate_data.csv
│   ├── observed.csv
│   ├── rain_north.csv
│   ├── rain_central.csv
│   └── rain_south.csv
└── models/
    └── baseline/
        ├── stringybark.ini     ← the model (uses trailhead paths)
        └── analysis.ipynb      ← the notebook we'll write

The notebook sits next to the model file. That's deliberate — keep your scripts and analysis alongside the artefact they operate on so relative paths stay simple.

Step 1 — Install the kalix package

pip install kalix

This installs the kalix Python package, which bundles the Kalix simulation engine as a native extension. You don't need to install the Kalix CLI separately — the engine runs in-process from Python.

Verify it works: