Skip to content

Instantly share code, notes, and snippets.

View flooxo's full-sized avatar
💭
^^

flox_x flooxo

💭
^^
  • Technical University of Munich
View GitHub Profile
@flooxo
flooxo / TreeView.py
Last active April 7, 2025 02:36 — forked from sunnymax2002/TreeView.py
Wrapper over Treelib to easily generate and update required data for nicegui Tree with description
from typing import Dict
from treelib import Node, Tree
class TreeNode:
"""If parent_id is -1, node at root level"""
def __init__(self, id, parent_id, disp_text, node_data=None, description=None) -> None:
self.id: int = id
self.parent_id: int = parent_id
self.disp_text: str = disp_text
self.node_data = node_data