Skip to content

Marimo Notebook Tutorial

In this tutorial we will build a simple web app with Marimo to explore Komodo RX Data

Create and change into a new directory:

Terminal window
mkdir komodo-rx-data-explorer
cd komodo-rx-data-explorer

Then, initialize a new uv project:

Terminal window
uv init --python "python >=3.11, <3.14"

Add the Komodo SDK package:

Terminal window
uv add komodo

Finally add 3rd party dependencies to the project:

Terminal window
uv add marimo polars pandas altair
Terminal window
uv run komodo login

This will start the OAuth flow and store your JWT and refresh token.

Terminal window
uv run komodo account set

Download the komodo_notebook.py marimo notebook and save it in the root of your project.

Terminal window
curl -o komodo_notebook.py https://docs.komodohealth.com/komodo_notebook.py
Terminal window
uv run marimo edit komodo_notebook.py

This will open the notebook in your browser

  1. Run the first 2 cells to list your available schemas.

  2. Find your schema name (typically PROD, DATA, or COHORTS) and enter it in cell 3 to list tables.

  3. Locate the RX data table (contains RX in the name, e.g., T1_ALL_TX_CLAIMS_RX).

  4. Update the SCHEMA and TABLE variables in cell 4 with your values and run the cell.

  5. Run the remaining cells to generate the chart.

  6. Enable app view and use the brand selector to explore different data views.

Marimo App View

Congrats! You’ve built a simple web app with Marimo to explore Komodo RX Data.