mattg31
Posts: 79
Joined: Fri Jan 05, 2018 9:55 pm

Updating python script automatically

Thu Feb 21, 2019 9:36 pm

I'm not sure if this is possible, and if it is, I'm not sure what to start researching. If someone could point me in the right googling direction that would be much appreciated!

I have a python program that runs on startup of my pi(s). This program takes sensor measurements, then posts them via JSON to a web API I built. I have a few raspberry pi 3's that are doing this. My question is: I want to make changes to the python code that these Pi's are running in an efficient way. Is it possible to have the python code "check for updates" at a cloud location? I'm almost imagining like a dropbox link or something that the code checks to see if the filename at location X has changed (V1 s V2), and if so, it downloads and replaces with updated version.

Thanks in advance for any advice, and I'm sorry if this is not the most appropriate place to ask this question.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Updating python script automatically

Thu Feb 21, 2019 9:43 pm

Ansible https://www.ansible.com is one possible solution.

BalenaCloud https://www.balena.io/cloud/ is another.

Or something 'homemade' based around rsync? https://linux.die.net/man/1/rsync

mattg31
Posts: 79
Joined: Fri Jan 05, 2018 9:55 pm

Re: Updating python script automatically

Fri Feb 22, 2019 9:43 am

thanks!

Return to “Python”