xarray-treeview 2025.4.9.2


pip install xarray-treeview

  Latest version

Released: Apr 09, 2025


Meta
Author: Marcel Goldschen-Ohm
Requires Python: >=3.10

Classifiers

Development Status
  • 4 - Beta

Intended Audience
  • Developers

License
  • OSI Approved :: MIT License

Programming Language
  • Python :: 3 :: Only

xarray-treeview

PyQt/PySide tree model/view interface for an Xarray DataTree.

GitHub Tag build-test GitHub Release publish

Install

Requires a PyQt package. Should work with PySide6, PyQt6, or PyQt5.

pip install PySide6

Install latest release version:

pip install xarray-treeview

Or install latest development version:

pip install xarray-treeview@git+https://github.com/marcel-goldschen-ohm/xarray-treeview

Quick Start

from qtpy.QtWidgets import QApplication
from xarray_treeview import *

app = QApplication()

# Xarray DataTree
dt: DataTree = ...

# XarrayTreeModel: without drag-n-drop
# XarrayDndTreeModel: with drag-n-drop (move within tree only)
model = XarrayDndTreeModel()
model.setDataTree(dt)

# XarrayTreeViewer includes XarrayTreeView plus info and attrs views
# but you can use XarrayTreeView standalone too.
viewer = XarrayTreeViewer()
view: XarrayTreeView = viewer.view()
view.setModel(model)

viewer.show()
app.exec()

Documentation

:construction:

Extras: None
Dependencies:
numpy (>=1.26.2)
xarray (>=2025.3.1)
qtpy (>=2.4.1)
qtawesome (>=1.4.0)
pyqt-ext (>=2025.4.9.2)