U
U
Ulyana Illiterate2020-08-19 14:48:39
Python
Ulyana Illiterate, 2020-08-19 14:48:39

What is the most logical way to store persistent data in Python?

5f3d0f9693a91641547229.png

I have a program written in Python, I compile it into an exe file using pyinstaller

, I have a lot of initial, permanent data .. I don’t like how it looks and started thinking about how to arrange it more beautifully and correctly ..
maybe into a database, does it make sense?! ?
in a separate *.ru file, then, in theory, it will develop in exe
. In general, advice is needed. Maybe I'm making my life difficult

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Korotenko, 2020-08-19
@firedragon

The most correct, in my opinion, is a local database, the second option is a file, however, you can combine Settings into a database or registry, and specific data for a specific project into it

T
Ternick, 2020-08-19
@Ternick

P **** c, what kind of code is this.
In general, you can suggest using .json files and driving all the variables there, but there will be difficulties with the variables that you consider at the time of launch, {example - 10 / 755}, it is better to calculate such variables right away, before shoving them into json.

V
Vladislav Lyskov, 2020-08-19
@Vlatqa

built-in sqlite
https://habr.com/en/company/ruvds/blog/514538/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question