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.tomlin the repo for the current floor)
Install
Optional groups (tables, charts, UI extras, auth, CLI) are documented in Dependency strategy.
Minimal mental model
- Define a function that returns an
Elementtree (often with@component). - Mount it with
render(Page(...))orrender_app(App(...))underif __name__ == "__main__":. - 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.