This is close to working with the subprocess module, but I think multiprocessing would be better. Currently, with subprocess the lights become erratic after a while. Multiprocessing resources: - https://towardsdatascience.com/a-python-api-for-background-requests-based-on-flask-and-multi-processing-187d0e3049c9 - https://stackoverflow.com/questions/43478675/raspberry-pi-python-flask-web-control-with-adafruit-dotstar-leds
This is close to working with the subprocess module, but I think multiprocessing would be better.
Currently, with subprocess the lights become erratic after a while.
Multiprocessing resources: