File: 02_git_tree.py

package info (click to toggle)
python-trame 3.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 101,620 kB
  • sloc: python: 13,515; sh: 183; javascript: 93; makefile: 7
file content (26 lines) | stat: -rw-r--r-- 692 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
r"""
Installation requirements:
    pip install trame trame-vuetify trame-components
"""

from trame.app import get_server
from trame.ui.vuetify import VAppLayout
from trame.widgets import trame

selection = ["2"]
tree = [
    {"id": "1", "parent": "0", "visible": 0, "name": "Wavelet"},
    {"id": "2", "parent": "1", "visible": 0, "name": "Clip"},
    {"id": "3", "parent": "1", "visible": 1, "name": "Slice"},
    {"id": "4", "parent": "2", "visible": 1, "name": "Slice 2"},
]
server = get_server(client_type="vue2")

with VAppLayout(server):
    trame.GitTree(
        sources=("tree", tree),
        actives=("selection", selection),
    )

if __name__ == "__main__":
    server.start()