How to persist data between executions in Python

后端 未结 6 805
栀梦
栀梦 2021-01-19 05:58

I am working on a personal project in Python where I need some form of persistent data. The data would fit in 2-3 tables of 10-20 columns and 100-200 records each. I have

6条回答
  •  别那么骄傲
    2021-01-19 06:40

    The real question is really what kind of operations you want to do with your data.

    As far as storage possibilities, the simplest solutions are indeed sqlite3 and pickle.

    The solution that you will choose depends basically on whether using SQL or Python is the easiest way for you to manage your data. SQL is probably better at complex operations than Python, but Python is definitely more lightweight and simpler, and therefore is a good choice for simple operations. So, if using pickle+Python is too cumbersome, then sqlite3 is a very good choice.

提交回复
热议问题