This is what I'm using now....
import tempfile
import json
with tempfile.NamedTemporaryFile(suffix='.json') as tf:
json.dumps(jsonKey)
keyPath = tf.name
I looking for a way to create a temporary file that will be automatically removed when execution/session will finish (even if it will be errored)
P.S. Without using file.remove()
it should be auto removed!