I'm writing a couple small python scripts to do tasks and act as 'bots' in some applications that will all read/write things for configuration and some very low-level logging of information; Whats the best way of storing these snippets of information?
Currently I've made a single config.json file that has Bot tokens, user information with ID numbers and configurations of the bots such as if theyre enabled or not, file names and when they last produced a response.
The bots will be running in nested screens on a Raspberry Pi I have, so my plan was to have them update the JSON file for their relevant "Last Response" key so that my 'controller' script can read this and alert me if they have not updated in [x] minutes based on their frequency of running, I will be checking if the screen is still active but dont know how to read into that screen to see if it is still printing.
The concern I have is having multiple files write to the same JSON can conflict and cause an error if not handled and not write the value as expected, the work around would be smaller individual config files or logging files to record when they responded and then the controller can gather that information to prevent multiple writes from different sources.
Is there a better way of doing this than I already am or could do?