How to save data between execution in Python

I am working on a personal Python project where I need some form of persistent data. The data would fit in 2-3 tables of 10-20 columns and 100-200 records. I have a basic understanding of SQL, so the database seems to make sense.

I am new to Python, so I am not familiar with the database interface parameters with Python. I also heard about etching and am not sure if this would be the best solution for my project size. Can anyone recommend a good solution?

+3
source share
5 answers

, - pickle .

, .

+6

sqlite3, Python.

ORM.

+5

. SQL , ORM . , JSON ...

+2

sqlite3. , . SQLAlchemy.

0

- , .

sqlite3 pickle.

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

0
source

All Articles