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

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)
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 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.0rc0.tar.gz (679.6 kB 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.0rc0-py3-none-any.whl (572.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: streamlit_arborist-0.2.0rc0.tar.gz
  • Upload date:
  • Size: 679.6 kB
  • 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.0rc0.tar.gz
Algorithm Hash digest
SHA256 0510afec4fa23eeae3b88aaa796b3f80b3b2a52b14f2aa008a190bba7822906b
MD5 ad042df2b52adbe9c90c52803e191328
BLAKE2b-256 ba8237df9e36be61d10b3984d28e72402194f352809130a0b56113586e3f3544

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for streamlit_arborist-0.2.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b7897baf54c99f49fb166485e3f37219caada4fcd9632ef6a7c4b715b88f6ae
MD5 66a4cfe843a107d32dd5db071d454425
BLAKE2b-256 69a5988d46c0667b068966b68a99ed2d6f5ebfac1bad666855bf531c49e857a4

See more details on using hashes here.

Provenance

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