Skip to main content

Streamlit component for creating tree views

Project description

streamlit-arborist

CI - Test, Build and Release PyPI - Version PyPI - License

streamlit-arborist is a Streamlit component based on react-arborist for visualizing hierarchical data structures as interactive tree views.

Installation

pip install streamlit-arborist

Basic usage

A minimal app.py file with sample data:

from streamlit_arborist import tree_view, tree_checkbox

data = [
   {
      "id": "1",
      "name": "Parent 1",
      "children": [
         {"id": "1.1", "name": "Child 1"},
         {"id": "1.2", "name": "Child 2"}
      ]
   },
   {
      "id": "2",
      "name": "Parent 2",
      "children": [
         {"id": "2.1", "name": "Child 3"},
         {"id": "2.2", "name": "Child 4"}
      ]
   }
]

tree_view(data)
tree_checkbox(data)

Run Streamlit:

streamlit run app.py

Development

This repository is based on streamlit/component-template template. Find details about custom components in Streamlit documentation.

Setup

The development environment requires uv and Node.js + npm installed. See make help for all commands.

Install the dev Python environment defined in pyproject.toml and npm packages in streamlit_arborist/frontend:

make setup

Running

While developing the frontend, you must set the environment variable STREAMLIT_ARBORIST_DEV=true. (this is done in make commands)

  1. Run the app/example.py app file with Streamlit:

    make backend
    
  2. Start the component's frontend server:

    make frontend
    

Open the app running at http://localhost:8501.

Build

Build the React frontend at streamlit_arborist/frontend/build/ directory and the Python package wheels at dist/.

make build

Documentation

The documentation files are located in docs/ directory and written with Sphinx.

make -C docs build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_arborist-0.4.0rc0.tar.gz (12.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_arborist-0.4.0rc0-py3-none-any.whl (12.7 MB view details)

Uploaded Python 3

File details

Details for the file streamlit_arborist-0.4.0rc0.tar.gz.

File metadata

  • Download URL: streamlit_arborist-0.4.0rc0.tar.gz
  • Upload date:
  • Size: 12.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for streamlit_arborist-0.4.0rc0.tar.gz
Algorithm Hash digest
SHA256 b11a1eacfce6e589be69dfbdee1c1a3a13052335cf0b892a20bd4df5dcd9a36e
MD5 86deeafba69f0cee9d0f1fc8af3f0602
BLAKE2b-256 29817e84f1a5b790e17a59752e1efe77f7ff1243c5a625969cd5b4c7cdc8da8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_arborist-0.4.0rc0.tar.gz:

Publisher: test-build-release.yaml on gabriel-msilva/streamlit-arborist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file streamlit_arborist-0.4.0rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_arborist-0.4.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f488d843428b6005d68a38a30b91f3e04b6f36742155a64909c2abb512e9b4e
MD5 5bdedd12df92702d2291cb2e3fa0b05f
BLAKE2b-256 35c3ba0a3190c179347c266638c3dd52e91d0b72b7e5955e5a6827924c5c50f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_arborist-0.4.0rc0-py3-none-any.whl:

Publisher: test-build-release.yaml on gabriel-msilva/streamlit-arborist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page