Martin McBride
May 17, 2024

--

There are a couple of thing to consider before using pickle files.

One is that the format is not guaranteed to be stable between python versions. If you upgrade to a new Python version, you might find that you can no longer read old pickle files.

The second is that it is not secure. Malicious pickle files can be constructed that can execute any python code the attacker chooses. To delete your hard drive, install viruses, or pretty much anything.

They should only be used for temporary storage.

--

--

Martin McBride
Martin McBride

Responses (2)