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

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)

Run Streamlit:

streamlit run app.py

Development

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

The development environment requires uv and Node.js + npm installed.

Setup

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

make setup

Running

While developing the frontend, set _RELEASE = False in __init__.py.

  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

Set _RELEASE = True in __init__.py and run:

make build

Documentation

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

make docs

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.2.1.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.2.1-py3-none-any.whl (12.7 MB view details)

Uploaded Python 3

File details

Details for the file streamlit_arborist-0.2.1.tar.gz.

File metadata

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

File hashes

Hashes for streamlit_arborist-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3c271a303492f3c9132200c6756096d7f05198b4963667589930d126558eacb4
MD5 70debdf653e5039f00d8790ef0bc0fcc
BLAKE2b-256 7a2d9ffc12d9ea585249d3c764f71b3c6a02d33d106bde97fad9d31a982fae5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_arborist-0.2.1.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.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_arborist-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5931412a702a61e095ccce00b2094e322ded14592bed63ed32d6b121bb1a586b
MD5 6fb539a811746a786db0acd8ff21bed7
BLAKE2b-256 ab9e209f256249bc63de04a75d40f74c33420cd79ae253ed65c8bdd30d587db4

See more details on using hashes here.

Provenance

The following attestation bundles were made for streamlit_arborist-0.2.1-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