How to remotely update Python applications

Viewed 21628

What is the best method to push changes to a program written in Python? I have a piece of software that is written in Python that will regularly be updated. What would be the best way to do this? All the machines will have Windows 7.

Also, excuse the ambiguity of my question. This will be my first time having to implement an updating procedure. Feel free to mention specifics you would like me ot add.

4 Answers

For those of you that would be looking into something a little less dated, I was just looking at how to create python applications that can be updated remotely (though not limited to Windows like OP).

It seems like esky as been a solution for a while. Though it's been deprecated since 2018.

The latest and most up to date solution seem to be a combination of pyinstaller and pyupdater. Note that I don't have personal experience with it, I'm looking for a friend.

It seems to support windows, linux and Mac though and both python 2 and 3 so definitely worth having a look.

The basic principles of application updates are described well by DSimon's answer.

However, update security is a different matter altogether: You don't want your clients to end up installing malicious files.

PyUpdater, as suggested in jlengrand's answer, does provide some secure update functionality, but, unfortunately, PyUpdater 4.0 is broken and there has not been a new release in over half a year (now Aug 2022).

There's also python-tuf, which is the reference implementation of The Update Framework (TUF). TUF (python-tuf) does everything humanly possible to ensure your update files are distributed securely. However, it does not handle application-specific things like checking for new application versions and installation on the client side.

Related