Python corruption prevention

How to prevent damage in the shelf file? If a shelf closes most of the time and then opens only when I need to read or change the value?

+3
source share
1 answer

If the safety of your permanent facilities is of great importance in your project, use is shelvenot a good idea. Also there is no etching of objects and manually write them to files.

Consider real databases putting huge resources (intellectual resources and code) in a safe place in the event of a failure. Therefore, keep your data in a real database. The simplest would be sqlite, since it comes with Python. sqliteIt’s quite safe and has many skills in maintaining your data in some acceptable condition even in the event of system crashes (for example, when someone disconnects the power cable from your PC).

+4
source

Source: https://habr.com/ru/post/1775864/


All Articles