Hi, there is a very simple solution to the asked question.
Well, if you actually are looking for a temp file which has a particular name, then you will have to use a built-in function for this.
The built-in function is called the NamedTemporaryFile function. I am sure you would already be aware of this or you have used this in the past. I tend to do this myself too, haha!
Then, later what you can do is to make use of the temp.name and this should directly solve your issues.
For further clarification, I suggest you check out the official Python documentation for the tempfile and you should be good to go.
Hope this helped!