Rendering some simple graphs

I’d like to render ( in a python + gtk4 app ) some simple graphs of the performance of some jobs. Back in the day, I wrote a simple graphing engine in perl + gtk3 + cairo ( eg GitHub - dankasak/powercom-utilities: Utilities & GUI browser for owners of Powercom ( Sunny Roo ) inverters ). Does anyone have any tips for approaching this in gtk4 + python? Is cairo still the way to go?

Hi,

Cairo is still supported (see example), though not actively maintained so gtk tries to slowly move away from it.

For simple shapes like rectangles, you can use Graphene (see example).

For more complex drawing (cairo-like), there is now Gsk.Path since gtk-4.14.
I don’t have examples in Python, but there are some in C in the gtk4-demo.