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.
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 scriptYou will often need multiple terminals:
slowdash --port=18881In 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.pyWhat venv does:
slowpy is available from your scriptsFor SlowDash users, the key point is:
venv is (an isolated Python environment)slowdash-activate-venv before running scripts in a
new terminalUseful 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:
(.venv) (depends on
shell)python and pip point to
.venv/bin/...pip stay inside that
environmentIf 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-venvEnable 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 ~/.bashrcThen verify:
$ pyenv versionRecommended approach:
pyenv: selects and manages Python runtime versionsvenv: isolates project dependenciesSlowDash 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)=valueImportant YAML rules:
key: value pairs define mappingsSlowDash 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:
timestamp,
channel, value, etc.)PRIMARY KEY uniquely identifies a row (often timestamp
+ channel in time-series tables)Minimum SQL you should recognize:
SELECT ... FROM table to read dataWHERE ... to filter rowsORDER BY ... to sort rowsLIMIT N to fetch only part of the resultExample:
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.
When data is recorded, each value has a timestamp. This section explains how that timestamp itself is represented:
unix: elapsed seconds from
1970-01-01 00:00:00 UTC (UNIX epoch),
timezone-independentwith time zone (or aware)without time zone / naive (generally
discouraged)unspecified utc (time string without zone, but known to
be UTC)Practical difference:
unix is a numeric elapsed-time representationUse unix when possible for least ambiguity.
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:
testdata[channel]@timestamp(unix)=valuenumeric_data[endpoint]@timestamp(with timezone)=value_rawMeaning:
table: source table or measurement[tag]: column used as channel name@time_column(type): timestamp source and type=value_column: value fieldSlowDash server examples often use port 18881.
http://localhost:18881-p 18881:18881Containers 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:
-v $(pwd):/project
$(pwd)): your current host directory/project): path inside the container-p 18881:18881
http://localhost:18881
reaches SlowDash in the container--rm
Minimal single-container example:
$ cd YOUR_PROJECT_DIR
$ docker run --rm -p 18881:18881 -v $(pwd):/project slowproj/slowdashWhat happens:
http://localhost:18881 in your browser.--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:
docker compose up can start SlowDash + database
togetherdocker compose down can stop them togetherStart and stop:
$ docker compose up
$ docker compose down