Getting started
Prerequisites
Guitares requires Python 3.10 or higher. The following packages are installed automatically as dependencies:
PySide6 — Qt6 bindings for Python
PySide6-WebEngine — web engine for the map widget and webpage element
PyYAML — YAML configuration file parsing
geopandas, numpy, pandas, pyproj, shapely — geospatial and numerical support
Installation
Install the latest release from PyPI:
pip install guitares
For an editable installation from source (useful during development):
git clone https://github.com/deltares-research/guitares.git
cd guitares
pip install -e .
Verifying the installation
After installation, run the included hello example to verify everything works:
cd examples/hello
python hello.py
You should see a small window with an edit box that greets you by name.
Project structure
A Guitares application consists of four files:
File |
Purpose |
|---|---|
|
YAML configuration file describing the window and all UI elements |
|
Creates the |
|
Contains callback functions that run when the user interacts with the GUI |
|
Entry point that imports |
See A Very Simple Example for a complete walkthrough.
Map engine
Guitares supports two map engines for the interactive map widget.
The engine is selected when creating the GUI object:
from guitares.gui import GUI
gui = GUI(app, config_file="myapp.yml", map_engine="maplibre")
Engine |
Notes |
|---|---|
|
Open-source, no API token required, works offline. Recommended default. |
|
Requires a Mapbox API token stored in a file called |
See The Map Widget for full documentation of the map widget.