Cuiman GUI usage¶
The Cuiman GUI client extends the Python API client by adding dedicated GUI-widgets for specific features:
client.show(): execute a given process execution request,client.show_jobs(): show all jobs resulting from process execution,client.show_job(): show the details of a specific job.
Apart from that, they share the same interface. In the following, we visit all the features by example.
The client expects a running server that conforms to the OGC API - Process: Part 1, Version 1.0. If you don't have one available, you can also run the project's server with a test configuration:
wraptile run -- wraptile.services.local.testing:service
In [1]:
Copied!
from cuiman.gui import Client
from cuiman.gui import Client
In [2]:
Copied!
client = Client(api_url="http://localhost:8008/", auth_type="none")
#client
client = Client(api_url="http://localhost:8008/", auth_type="none")
#client
In [3]:
Copied!
client.show()
client.show()
Out[3]:
In [9]:
Copied!
_request
_request
Out[9]:
{
"dotpath": true,
"inputs": {
"bbox": [
5.873292,
52.495491,
13.519776,
55.140582
],
"end_date": "2025-02-01",
"output_path": "test.zarr",
"periodicity": 1,
"resolution": 0.5,
"start_date": "2025-01-01",
"var_names": "a, b, c"
},
"outputs": {
"return_value": {
"format": {
"mediaType": "application/json"
},
"transmissionMode": "reference"
}
},
"process_id": "simulate_scene"
}
In [10]:
Copied!
_results
_results
Out[10]:
{
"return_value": {
"href": "file:///C:/Users/Norman/Projects/eozilla/notebooks/test.zarr",
"hreflang": null,
"rel": null,
"title": null,
"type": "application/zarr"
}
}
In [7]:
Copied!
client.show_jobs()
client.show_jobs()
Out[7]:
In [11]:
Copied!
client.show_job("job_1")
client.show_job("job_1")
Out[11]:
In [12]:
Copied!
_results
_results
Out[12]:
{
"return_value": {
"href": "file:///C:/Users/Norman/Projects/eozilla/notebooks/test.zarr",
"hreflang": null,
"rel": null,
"title": null,
"type": "application/zarr"
}
}
In [13]:
Copied!
import xarray as xr
xr.open_dataset(_results["return_value"]["href"])
import xarray as xr
xr.open_dataset(_results["return_value"]["href"])
Out[13]:
<xarray.Dataset> Size: 56kB
Dimensions: (time: 31, lat: 5, lon: 15)
Coordinates:
* time (time) datetime64[ns] 248B 2025-01-01 2025-01-02 ... 2025-01-31
* lat (lat) float64 40B 52.75 53.28 53.82 54.35 54.89
* lon (lon) float64 120B 6.123 6.634 7.144 7.655 ... 12.25 12.76 13.27
Data variables:
a (time, lat, lon) float64 19kB ...
b (time, lat, lon) float64 19kB ...
c (time, lat, lon) float64 19kB ...In [ ]:
Copied!
In [ ]:
Copied!