Is it possible to run python scripts trough a flutter app running on Raspberry Pi?
With process_run package you can call scripts like in the command line. From the way I understand your problem you could prepare the required python scripts, store them and call them with process_run whenever you need them.
This is roughly equivalent to the python module called subprocess
.

Tin Pocrnic
Updated on January 02, 2023Comments
-
Tin Pocrnic 5 months
I am working on an automation app for Raspberry that requires a few python scripts to work. I made the front end in flutter. Is it possible to run these python scripts through a flutter app running on Raspberry Pi when a button in that app is pressed? (for example turning a stepper motor, sending current through a GPIO pin for a few seconds) It should work offline, and I would prefer if these scripts were saved as an external .py file.
To run the app on raspberry, I was planning on using https://github.com/ardera/flutter-pi If there is a better variant to do that, please tell me so.
-
Tin Pocrnic over 1 yearThat’s exactly what I needed, thank you!