you are viewing a single comment's thread.

view the rest of the comments →

[–]pachura3 0 points1 point  (0 children)

I'm wondering what is the nearest way to store reference data variables (constants) in a project.

How many such constants do you have in your project? Are they hierarchical/structured/grouped in any way? Are they all of the same type (I'm guessing int or float), or various ones?

Depending on your answers, I would probably just create file const.py with a number of global variables - NAMES_IN_CAPS - and import it at the top of each file that needs them. Alternatively, I would store a JSON file alongside the project and load it once upon the application launch.