MicroPython is a well-known and easy-to-use way to program microcontrollers in Python. If you’re using an Arduino Uno Q, ...
It's a solved problem, but I actually prefer a simple web UI.