Hello,
I’m pretty new in coding and in Balena OS, I want to implement a pyhton file in my RevPI connect that I flash with Balena OS. First I implement the “hello world python project” but in thise project there is only one file in python “src” and this file call an other file via render_template(‘index.html’). I want to implement a pyhton file that will integrate modbus communication. There is any solution to run a python as “master” file in Balena OS.
So if you want to run a python file in a container in balena OS, just like the hello world example is running a webserver in a container, I would recommend the folliwing:
As balenaOS is built around running containerised applications - if you are unfamiliar with this sort of environment, its worth looking up a little bit about these workflows: Define a container - Balena Documentation