I'm creating a simple Python CLI tool, which lets the user add and delete tasks (the classic Todo app). This is just for my own use, but I want to get into the best practices of creating such applications. The data will be stored in a simple text file.
Main question: Where should I store the data file? After doing some reading, I'm inclined to create a new folder in /var/lib
and keep the data.txt
file in that directory. Are there any drawbacks to that option?
Follow up question: Since, by default, only root has access to /var
, do I need to change the permissions for the whole /var
directory in order to read and write to the data file?