Skip to content

Getting started

StreamTree is a declarative UI layer on top of Streamlit: you build a tree of elements (layouts, widgets, your own @component functions) and call render or render_app so the built-in renderer maps them to st.* APIs on each rerun.

Requirements

  • Python 3.10+
  • Streamlit ≥ 1.33 (see pyproject.toml in the repo for the current floor)

Install

pip install streamtree

Optional groups (tables, charts, UI extras, auth, CLI) are documented in Dependency strategy.

Minimal mental model

  1. Define a function that returns an Element tree (often with @component).
  2. Mount it with render(Page(...)) or render_app(App(...)) under if __name__ == "__main__":.
  3. Run with streamlit run your_app.py.

The First app & components recipe walks through the smallest counter-style app and links to examples/counter.py.

Where to go next

Goal Page
Cookbook patterns Recipes overview
Every examples/*.py file inlined Examples (full source)
Testing & AppTest Testing & debugging
Architecture & phases Guides → Design & roadmap

Repository README

Install matrices, capability tables, streamtree CLI usage, contributing, and CI badges live in the canonical README on GitHub so PyPI and the repo stay in sync.