Run This Ai
EN DE

Taipy Tutorial: Build Your First Data Dashboard with Python

A step-by-step tutorial showing how to build, deploy, and manage a data visualization dashboard with Taipy — from installation to Docker deployment.

Introduction

Taipy is the Python framework that turns data science workbooks into interactive web applications without touching a single line of HTML or JavaScript. In this hands-on tutorial, we'll walk through building a real data exploration app from scratch — and then deploying it with Docker.

🚀 Want to deploy Taipy yourself?

Docker configs, system requirements, and installation guides — all on one page.

View Taipy Tool Page →

Step 1: Installation

Taipy requires Python 3.8+. Install it in a virtual environment:

python3 -m venv taipy-env
source taipy-env/bin/activate
pip install taipy

Verify installation:

python -c "import taipy; print(taipy.__version__)"

Step 2: Build a Data Dashboard

Let's create a simple CSV data visualization app. Create app.py:

import taipy.gui.builder as tgb
import pandas as pd

# Sample data
data = pd.DataFrame({
    "Month": ["Jan","Feb","Mar","Apr","May","Jun"],
    "Sales": [120, 240, 180, 310, 290, 420],
    "Costs": [80, 150, 120, 200, 180, 250]
})

# Build the page
page = tgb.Page()
with page:
    tgb.text("# Sales Dashboard", mode="md")
    tgb.table("{data}")
    tgb.chart("{data}", type="bar", x="Month", y=["Sales", "Costs"])

if __name__ == "__main__":
    tp.Gui(page).run()

Step 3: Add Scenario Management

One of Taipy's superpowers is built-in scenario management. You can define data pipelines as DAGs and run "what-if" scenarios:

import taipy as tp

# Define a scenario configuration
@tp.configure(scope=tp.Scope.SCENARIO)
def predict_sales(history, growth_rate=0.1):
    return history * (1 + growth_rate)

# Create and submit scenarios
scenario = tp.create_scenario()
tp.submit(scenario)

Step 4: Docker Deployment

Taipy runs perfectly in Docker. Use the official image:

docker run -d \
  --name taipy \
  -p 8080:8080 \
  -v $(pwd)/data:/data \
  taipy/taipy:latest

The app is now accessible at http://localhost:8080. For production deployment with proper Docker Compose setup, visit the Taipy tool page on Run This Ai.

🚀 Ready to deploy Taipy in production?

Full Docker Compose setup, system requirements, and install guide — all on one page.

Deploy Taipy →
#taipy #tutorial #python #data-dashboard #docker