PyQt/PySide model/view for tree of Xarray datasets.
Project Links
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.
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:
Apr 09, 2025
2025.4.9.2
Sep 19, 2024
2024.9.2
Sep 12, 2024
2024.9.1
May 08, 2024
1.2.6
May 07, 2024
1.2.3
May 06, 2024
1.2.2
Apr 30, 2024
1.2.1
Apr 30, 2024
1.2.0
Jan 11, 2024
1.0.2
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
(>=1.26.2)
numpy
(>=2025.3.1)
xarray
(>=2.4.1)
qtpy
(>=1.4.0)
qtawesome
(>=2025.4.9.2)
pyqt-ext