Step-by-Step Guide
Getting Started with Golit
Architect high-performance data workflows with editorial precision. Follow this guide to initialize your environment and build your first reactive directed acyclic graph (DAG).
01 Prerequisites
terminal
Python Environment
Requires Python 3.11 or higher for optimal async performance and structural pattern matching.
python --version # 3.11.0+
database
Redis Store
State persistence and message brokering are handled via Redis. Ensure a local instance is running.
redis-cli ping # PONG
02 Installation
pip install golit --upgrade
03 Minimal Example
Create a reactive dashboard using Golit's core primitives. This script demonstrates state management with gl.slider and reactive dependencies with gl.derived.
description
app.py
import golit as gl
# 1. Define atomic state
slider = gl.slider(label="Input Value", min=0, max=100, default=42)
# 2. Derive state (Reactive Node)
@gl.derived(depends_on=[slider])
def compute_square(val):
return val ** 2
# 3. Architect the Layout
layout = gl.layout(
title="Technical Overview",
children=[slider, compute_square]
)
if __name__ == "__main__":
gl.run(layout)
SLIDER
42.0
DERIVED
1764.0