Let's say there are multiple existing python objects and functions that I want to initiate via a GUI and input some custom code to work with them.
For example:
Obj1
and Obj2
are two instances of a class which have an attribute .value
. f1
and f2
are some functions. These classes and functions already exist in some python file src.py
I have locally.
Now, I want my students to be able to initiate as many of these instances (Obj1, Obj2) objects as they like, code some rule-based (custom) system, and then execute these functions (f1, f2).
A simple rule would, for example, be:
If Obj1.value
is larger than Obj2.value
, execute f1
, else, execute f2
.
What simple to use graphical software would make sense for this sort of thing? The custom code would not necessarily have to be in python, but since it is quite simple, that would be favourable.
I think this would be possible with Apache Nifi or Node-RED (not sure!). Is it also realisable (without weeks of effort) using tkinter?
Additional info which might be relevant:
The class of which the instances are called Obj1
and Obj2
contain MQTT subscriptions, so the .value
is getting updated frequently. The functions f1
would make API POST requests and f2
would write a value into a database.