I'm working on an IOT project where multiple users are running a Python package I maintain on a Raspberry Pi Zero. I send the Raspberry Pis out to the users with the software preloaded, but the project is still pretty early in development and updates to the package happen frequently.
The problem is, many of the users are not up to the task of updating a Python package on a Raspberry Pi with a headless OS. I'd like to find a way to set the Pi  to automatically upgrade the package with pip whenever I put out a new tagged version.
My initial thought was to use cron or systemd to run "sudo pip3 install my-package --upgrade" on startup. The major downside, though, is that pip takes a long time to run on a Raspberry Pi and using it this way seriously slows down boot time, even when there is no upgrade to install.
Is there a better way I haven't thought of?
You can make an API or mount server where the Raspberry request if there's a new version to update (you have to save what's is the current version installed), if there is, apply the update.
It is not a pythonic solution at all, but I will work for your purpose.
Auto-updating python package on Raspberry Pi