Prerequisites

Contents

Before You Start

This page, written by Claude, summarizes the minimum background knowledge needed before following the SlowDash documentation, especially Installation, Quick Tour, Project Setup, and Data Binding.

This documentation assumes you can:

If you are new to some of these topics, the quick notes below are enough to get started.

Terminal Basics

You should be comfortable with:

$ pwd                 # show current directory
$ ls -la              # list files
$ cd PATH/TO/DIR      # move to a directory
$ mkdir MyProject     # create a directory
$ python3 script.py   # run a Python script

You will often need multiple terminals:

Python and Virtual Environments

In native installation, SlowDash uses a project-local Python virtual environment (venv) prepared by make.

Typical flow:

$ source PATH/TO/SLOWDASH/bin/slowdash-bashrc
$ slowdash-activate-venv
$ python your-script.py

What venv does:

For SlowDash users, the key point is:

Useful checks after activation:

$ echo "$VIRTUAL_ENV"
$ which python
$ which pip

$VIRTUAL_ENV should be a non-empty path (for example, .../venv), and both python and pip should point to that environment.

When venv is active:

If your system Python is too old

If your OS-provided Python is already End-of-Life (EOL), avoid building your workflow on it. Use pyenv to install and select a supported Python version first, then run the normal SlowDash installation (make) so SlowDash sets up its venv with that Python.

Example flow:

$ pyenv install 3.12.9
$ pyenv local 3.12.9
$ make
$ source PATH/TO/SLOWDASH/bin/slowdash-bashrc
$ slowdash-activate-venv

Enable pyenv automatically in new terminals (.bashrc):

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - bash)"

After editing .bashrc, reload it:

$ source ~/.bashrc

Then verify:

$ pyenv version

Recommended approach:

YAML

SlowDash project configuration is written in YAML.

Minimal example:

slowdash_project:
  name: QuickTour
  title: SlowDash Quick Tour
  data_source:
    url: sqlite:///QuickTourTestData.db
    time_series:
      schema: testdata[channel]@timestamp(unix)=value

Important YAML rules:

RDBMS and SQL Basics

SlowDash commonly reads data from SQL databases (RDBMS), such as PostgreSQL, MySQL, and SQLite. As a first image, think of RDBMS as storing data in multiple table-like sheets, similar to Excel. (Strictly speaking, RDBMS also defines formal relations between tables, which is beyond this introductory image.)

Minimum concepts:

Minimum SQL you should recognize:

Example:

SELECT timestamp, channel, value
FROM testdata
WHERE channel = 'ch00'
ORDER BY timestamp DESC
LIMIT 10;

You do not need advanced SQL to start Quick Tour, but these basics help when checking and troubleshooting data bindings.

Data Time Representation

When data is recorded, each value has a timestamp. This section explains how that timestamp itself is represented:

Practical difference:

Use unix when possible for least ambiguity.

Table Structure Description

Next, you need a way to describe the structure of your data table: which column is time, which is channel tag, and which is value. In SlowDash, this structure description is called a schema descriptor.

A common pattern is:

table[tag]@time_column(type)=value_column

Examples:

Meaning:

Basic Network and Port Awareness

SlowDash server examples often use port 18881.

Docker and Docker Compose Basics

Containers are optional in SlowDash. If you are not familiar with containers, you do not need to use Docker to get started; native installation is a valid and recommended first path.

When to skip containers (at first):

If you are new to containers, start with this mental model:

For SlowDash, this means:

Why introduce containers later:

Important options in examples:

Minimal single-container example:

$ cd YOUR_PROJECT_DIR
$ docker run --rm -p 18881:18881 -v $(pwd):/project slowproj/slowdash

What happens:

  1. Docker downloads the image if needed.
  2. A container starts and runs SlowDash.
  3. You open http://localhost:18881 in your browser.
  4. When you stop it, that container is removed (--rm), but your project files remain on host.

Minimal Docker Compose example:

In many practical setups, you also want a database without installing it directly on your host. In that case, both SlowDash and the database run as containers, so you need to run at least two containers together. Docker Compose automates this multi-container startup/shutdown from one configuration file.

services:
  postgres:
    image: postgres:16
    environment:
      - POSTGRES_USER=slowdash
      - POSTGRES_PASSWORD=slowdash
      - POSTGRES_DB=slowdash
    volumes:
      - postgres-data:/var/lib/postgresql/data

  slowdash:
    image: slowproj/slowdash
    depends_on:
      - postgres
    volumes:
      - .:/project
    ports:
      - "18881:18881"

volumes:
  postgres-data:

Why Compose is useful:

Start and stop:

$ docker compose up
$ docker compose down