EDIT: RESOLVED
Hi!
I've written a small site using Flask and a bunch of other stuff. I'm uploading images to Imgur from my site, hosted on PythonAnywhere. Before I upload to Imgur, I create a temporary file.
The problem is that PythonAnywhere uses web workers to handle multiple incoming requests to the server. If I name the file 'temp.png' then the second worker could clobber (overwrite) the file before it gets uploaded to Imgur. So it seems what I need is a unique filename for the file, but I'm not sure how to go about guaranteeing no web worker generates the same filename (in the event that they are both running at roughly the same time).
How do I do this?